/* Stage 2.2b — approved-template parity pass. Keeps Stage 2.1 UX decisions intact. */
[data-hor-ui][data-hor-ui]{--hor-ref-pale:#F5F8FF;--hor-ref-blue:#0C37E8;--hor-ref-yellow-pale:#FFF7DF}

/* Sidebar now mirrors the approved reference: current lesson, then the rest of the course map. */
[data-hor-ui][data-hor-ui] .hor-lesson-side-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
[data-hor-ui][data-hor-ui] .hor-lesson-side-head>div{display:grid;gap:3px;padding:0 8px}
[data-hor-ui][data-hor-ui] .hor-lesson-side-head small{font-size:12px;line-height:1.35;color:var(--hor-muted);font-weight:500}
[data-hor-ui][data-hor-ui] .hor-step-link.is-current{background:var(--hor-ref-yellow-pale)!important;border-left-color:var(--hor-yellow)!important;color:var(--hor-navy)!important}
[data-hor-ui][data-hor-ui] .hor-step-link.is-current .hor-step-num{background:var(--hor-navy)!important;color:#fff!important;border-color:var(--hor-navy)!important}
[data-hor-ui][data-hor-ui] .hor-side-course-modules{display:grid;gap:0;margin:18px 0 0;border-top:1px solid var(--hor-border)}
[data-hor-ui][data-hor-ui] .hor-side-module-link{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:13px 8px;border-bottom:1px solid var(--hor-border);color:var(--hor-navy)!important;text-decoration:none}
[data-hor-ui][data-hor-ui] .hor-side-module-link>span{display:grid;gap:2px;min-width:0}
[data-hor-ui][data-hor-ui] .hor-side-module-link strong{font-size:14px}
[data-hor-ui][data-hor-ui] .hor-side-module-link small{font-size:12px;line-height:1.35;color:var(--hor-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:165px}
[data-hor-ui][data-hor-ui] .hor-side-module-link b{font-size:15px;font-weight:500}
[data-hor-ui][data-hor-ui] .hor-side-module-link.is-locked{opacity:.55}
[data-hor-ui][data-hor-ui] .hor-side-modules-home{display:flex;align-items:center;gap:10px;min-height:48px;margin:22px 0 4px;padding:0 12px;border:1px solid var(--hor-border);border-radius:12px;background:#fff;color:var(--hor-navy)!important;font-weight:600;font-size:13px}

/* Lesson metadata from the reference mockup: small contextual icons, no extra visual noise. */
[data-hor-ui][data-hor-ui] .hor-lesson-meta span{gap:7px}
[data-hor-ui][data-hor-ui] .hor-lesson-meta .hor-icon{width:18px;height:18px;color:var(--hor-ref-blue)}

/* Phase-specific learning banner. */
[data-hor-ui][data-hor-ui] .hor-phase-intro{display:flex;align-items:center;gap:14px;margin:0 0 16px;padding:14px 18px;border-radius:14px;background:linear-gradient(90deg,#F3F7FF,#FAFCFF);border:1px solid #E4EAF7}
[data-hor-ui][data-hor-ui] .hor-phase-intro-icon{display:grid;place-items:center;width:36px;height:36px;min-width:36px;border-radius:50%;background:#EEF4FF;color:var(--hor-ref-blue);font-size:22px;font-weight:700}
[data-hor-ui][data-hor-ui] .hor-phase-intro strong{display:block;font-size:16px;line-height:1.3;color:var(--hor-navy)}
[data-hor-ui][data-hor-ui] .hor-phase-intro p{margin:3px 0 0!important;font-size:14px;line-height:1.45;color:var(--hor-muted)}

/* Słuchaj reference composition: player first, then a framed context split with image. */
[data-hor-ui][data-hor-ui] .hor-stage-demo>.hor-audio-player.hor-media-panel{margin:0 0 16px!important;padding:14px 16px!important}
[data-hor-ui][data-hor-ui][data-hor-module="0"] .hor-audio-layout{border:1px solid var(--hor-border);border-radius:16px;padding:14px 16px;background:#fff;grid-template-columns:minmax(0,1.4fr) minmax(260px,.8fr)!important;gap:22px!important;align-items:center!important}
[data-hor-ui][data-hor-ui] .hor-reference-eyebrow{display:flex;align-items:center;gap:8px;margin:0 0 8px;color:var(--hor-ref-blue);font-weight:700;font-size:13px}
[data-hor-ui][data-hor-ui] .hor-reference-eyebrow span{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#EEF4FF}
[data-hor-ui][data-hor-ui] .hor-audio-layout .hor-audio-copy h2{font-size:25px!important;line-height:1.25!important;margin:0 0 8px!important}
[data-hor-ui][data-hor-ui] .hor-audio-layout .hor-audio-illustration img{width:100%!important;max-height:205px!important;object-fit:cover!important;border-radius:12px}
[data-hor-ui][data-hor-ui] .hor-audio-tools{align-items:center;gap:8px!important}
[data-hor-ui][data-hor-ui] .hor-audio-transcript-jump{min-height:44px;padding:0 14px;border:1px solid var(--hor-navy);border-radius:11px;background:#fff;color:var(--hor-navy);font-weight:600;cursor:pointer}

/* Quick-reference phrase table from the approved lesson mockup. */
[data-hor-ui][data-hor-ui] .hor-quick-phrases{margin:18px 0 4px;padding:16px;border:1px solid var(--hor-border);border-radius:16px;background:#fff}
[data-hor-ui][data-hor-ui] .hor-reference-section-title{display:flex;align-items:center;gap:10px;margin-bottom:10px}
[data-hor-ui][data-hor-ui] .hor-reference-section-title h2{font-size:19px!important;line-height:1.3;margin:0!important}
[data-hor-ui][data-hor-ui] .hor-reference-section-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;border:2px solid var(--hor-ref-blue);color:var(--hor-ref-blue)}
[data-hor-ui][data-hor-ui] .hor-quick-phrase-list{border:1px solid var(--hor-border);border-radius:12px;overflow:hidden}
[data-hor-ui][data-hor-ui] .hor-quick-phrase-row{display:grid;grid-template-columns:32px minmax(170px,.8fr) minmax(0,1fr);gap:10px;align-items:center;min-height:40px;padding:4px 10px;background:#fff}
[data-hor-ui][data-hor-ui] .hor-quick-phrase-row+.hor-quick-phrase-row{border-top:1px solid var(--hor-border)}
[data-hor-ui][data-hor-ui] .hor-quick-phrase-audio{display:grid;place-items:center;width:24px;height:24px;border:1px solid #B9C5E2;border-radius:50%;font-size:10px;color:var(--hor-navy);background:#fff}
[data-hor-ui][data-hor-ui] .hor-quick-phrase-es{font-weight:700;color:var(--hor-navy)}
[data-hor-ui][data-hor-ui] .hor-quick-phrase-pl{color:var(--hor-muted)}
[data-hor-ui][data-hor-ui] .hor-quick-phrase-note{margin:9px 0 0!important;font-size:12px;line-height:1.45;color:var(--hor-muted)}

/* Practice surface closer to the approved reference: white exercise cards and compact count labels. */
[data-hor-ui][data-hor-ui] .hor-task-card{background:#fff!important}
[data-hor-ui][data-hor-ui] .hor-exercise-kicker{display:flex;align-items:center;gap:8px;margin:0 0 8px;color:#4F66B2;font-size:13px;font-weight:600;text-decoration:underline;text-underline-offset:3px}
[data-hor-ui][data-hor-ui] .hor-exercise-kicker:before{content:'▣';display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#EEF4FF;color:var(--hor-ref-blue);text-decoration:none}
[data-hor-ui][data-hor-ui] .hor-task-card>p:first-of-type strong{font-size:20px;line-height:1.35;color:var(--hor-navy)}
[data-hor-ui][data-hor-ui] .hor-task-card label:has(input[type="radio"]),
[data-hor-ui][data-hor-ui] .hor-task-card label:has(input[type="checkbox"]){background:#fff!important;border-radius:9px!important;min-height:44px!important;padding:9px 14px!important}
[data-hor-ui][data-hor-ui] .hor-task-card input[type="radio"],
[data-hor-ui][data-hor-ui] .hor-task-card input[type="checkbox"]{width:19px;height:19px;min-width:19px}
[data-hor-ui][data-hor-ui] .hor-task-actions{margin-top:12px!important}

/* Knowledge drawer: card rhythm and explanatory intro shown in the approved reference. */
@media(min-width:781px){
 [data-hor-ui][data-hor-ui] .hor-knowledge{width:min(400px,31vw);padding-left:18px;padding-right:18px}
}
[data-hor-ui][data-hor-ui] .hor-knowledge-intro{margin:14px 0 4px;font-size:13px;line-height:1.45;color:var(--hor-muted)}
[data-hor-ui][data-hor-ui] .hor-knowledge-section:not(.hor-package-action){margin:12px 0!important;padding:16px!important;border:1px solid var(--hor-border)!important;border-radius:14px!important;background:#fff!important}
[data-hor-ui][data-hor-ui] .hor-knowledge-section+.hor-knowledge-section{border-top:1px solid var(--hor-border)!important}
[data-hor-ui][data-hor-ui] .hor-knowledge-section h3{font-size:17px;line-height:1.35;margin:0 0 10px}
[data-hor-ui][data-hor-ui] .hor-package-action{padding:14px 0 4px!important}
[data-hor-ui][data-hor-ui] .hor-package-btn{border-radius:12px!important;box-shadow:0 6px 18px rgba(255,207,63,.18)}

@media(max-width:780px){
 [data-hor-ui][data-hor-ui] .hor-phase-intro{padding:13px 14px;margin-bottom:14px}
 [data-hor-ui][data-hor-ui][data-hor-module="0"] .hor-audio-layout{grid-template-columns:minmax(0,1fr)!important;padding:14px!important;gap:14px!important}
 [data-hor-ui][data-hor-ui] .hor-audio-layout .hor-audio-illustration{max-width:none!important}
 [data-hor-ui][data-hor-ui] .hor-audio-layout .hor-audio-illustration img{max-height:none!important;aspect-ratio:16/9;object-fit:cover!important}
 [data-hor-ui][data-hor-ui] .hor-quick-phrases{padding:14px;margin-top:16px}
 [data-hor-ui][data-hor-ui] .hor-quick-phrase-row{grid-template-columns:28px minmax(105px,.85fr) minmax(0,1fr);font-size:14px;gap:7px;padding:6px 8px}
 [data-hor-ui][data-hor-ui] .hor-quick-phrase-note{font-size:11px}
 [data-hor-ui][data-hor-ui] .hor-side-course-modules{margin-top:14px}
 [data-hor-ui][data-hor-ui] .hor-knowledge-section:not(.hor-package-action){padding:16px!important}
}


/* Stage 2.2c — ultimate visual audit: remove duplicate frames, orphan dividers and decorative icon noise. */
[data-hor-ui][data-hor-ui] .hor-secondary-details,
[data-hor-ui][data-hor-ui] .hor-module-goal-details,
[data-hor-ui][data-hor-ui] .hor-content-goals{
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  overflow:visible!important;
  box-shadow:none!important;
}
[data-hor-ui][data-hor-ui] .hor-secondary-details>summary,
[data-hor-ui][data-hor-ui] .hor-module-goal-details>summary,
[data-hor-ui][data-hor-ui] .hor-content-goals>summary{
  margin:0!important;
  border:1px solid var(--hor-border)!important;
  border-radius:14px!important;
  background:#F7F8FC!important;
  box-shadow:none!important;
}
[data-hor-ui][data-hor-ui] .hor-module-goal-details>summary{background:#fff!important}
[data-hor-ui][data-hor-ui] .hor-secondary-details[open]>summary{
  border-bottom-left-radius:0!important;
  border-bottom-right-radius:0!important;
}
[data-hor-ui][data-hor-ui] .hor-secondary-details[open]>.hor-secondary-details-body{
  border:1px solid var(--hor-border);
  border-top:0;
  border-radius:0 0 14px 14px;
  background:#fff;
  padding-top:12px!important;
}

/* Screen-to-screen spacing uses whitespace, not unexplained horizontal rules. */
[data-hor-ui][data-hor-ui] [data-hor-unit]+[data-hor-unit]{
  margin-top:30px!important;
  padding-top:0!important;
  border-top:0!important;
}

/* Decorative section markers were visually inconsistent. Keep icons only for real actions/metadata. */
[data-hor-ui][data-hor-ui] .hor-reference-eyebrow{
  display:block!important;
  margin:0 0 7px!important;
  color:var(--hor-ref-blue)!important;
  font-size:13px!important;
  font-weight:700!important;
  letter-spacing:.01em;
}
[data-hor-ui][data-hor-ui] .hor-reference-section-title{gap:0!important}
[data-hor-ui][data-hor-ui] .hor-reference-section-icon,
[data-hor-ui][data-hor-ui] .hor-phase-intro-icon{display:none!important}
[data-hor-ui][data-hor-ui] .hor-phase-intro{gap:0!important}
[data-hor-ui][data-hor-ui] .hor-exercise-kicker{
  gap:0!important;
  margin:0 0 10px!important;
  color:#4F66B2!important;
  font-size:13px!important;
  font-weight:700!important;
  text-decoration:none!important;
}
[data-hor-ui][data-hor-ui] .hor-exercise-kicker:before{display:none!important;content:none!important}

/* Quick-reference table: only real text, no fake play buttons and no markdown artifacts. */
[data-hor-ui][data-hor-ui] .hor-quick-phrase-row{
  grid-template-columns:minmax(180px,.8fr) minmax(0,1fr)!important;
  gap:16px!important;
  padding:8px 12px!important;
}
[data-hor-ui][data-hor-ui] .hor-quick-phrase-audio{display:none!important}
[data-hor-ui][data-hor-ui] .hor-quick-phrase-es{font-weight:600!important}
[data-hor-ui][data-hor-ui] .hor-quick-phrase-note{display:none!important}

/* Audio action labels remain literal and calm; no font-dependent repeat glyph. */
[data-hor-ui][data-hor-ui] [data-repeat]{letter-spacing:0!important}
[data-hor-ui][data-hor-ui] [data-audio-status]:empty{display:none!important}

/* Transcript has one visible entry point: the player action. The lower unit is revealed only after activation. */
[data-hor-ui][data-hor-ui] [data-screen-type="transcript_reveal"] details>summary{display:none!important}

@media(max-width:780px){
  [data-hor-ui][data-hor-ui] .hor-quick-phrase-row{
    grid-template-columns:minmax(115px,.85fr) minmax(0,1fr)!important;
    gap:10px!important;
    padding:8px 10px!important;
  }
}
