/* B5 · Material: Temario, material de la academia, apuntes y Guía de la app.
   Azul de marca; verde/rojo no se usan aquí (solo acierto/fallo). */
.bf-material { max-width: 1080px; margin: 0 auto; padding: clamp(16px, 3vw, 34px); color: #17243d; }
.bf-material__head { padding: clamp(20px, 3vw, 32px); border: 1px solid #c7d9f4; border-radius: 24px; background: linear-gradient(135deg, #f7fbff 0%, #eaf2ff 100%); }
.bf-material__eyebrow { margin: 0; color: #245ce5; font-size: 11px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.bf-material__head h1 { margin: 4px 0; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 900; line-height: 1.1; color: #10213d; }
.bf-material__head p { margin: 0; color: #51627c; font-size: .9rem; }

.bf-material__books { display: flex; gap: 8px; margin: 16px 0 12px; overflow-x: auto; padding-bottom: 4px; }
.bf-material__books button { flex: none; min-height: 44px; padding: 8px 14px; border: 1px solid #bfdbfe; border-radius: 999px; background: #ffffff; color: #1e3a8a; font-size: .85rem; font-weight: 800; cursor: pointer; }
.bf-material__books button.is-active { background: #2563eb; border-color: #2563eb; color: #ffffff; }

.bf-material__legislation { margin: 0 0 12px; padding: 14px 16px; border: 1px solid #dce5f2; border-radius: 16px; background: #ffffff; }
.bf-material__legislation h3 { margin: 0 0 6px; font-size: .9rem; font-weight: 850; }
.bf-material__legislation ul { margin: 0; padding-left: 18px; list-style: disc; }
.bf-material__legislation li { margin: 4px 0; font-size: .85rem; }
.bf-material__legislation small { display: block; color: #64748b; font-size: .75rem; }

.bf-material__topics { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.bf-material__topic { border: 1px solid #dce5f2; border-radius: 18px; background: #ffffff; box-shadow: 0 13px 30px -30px #0f172a; }
.bf-material__topic.is-open { border-color: #93c5fd; }
.bf-material__topic-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.bf-material__topic-main { flex: 1; min-width: 0; }
.bf-material__topic-main h2 { margin: 0; font-size: .95rem; font-weight: 850; overflow-wrap: anywhere; }
.bf-material__topic-main p { margin: 4px 0 6px; color: #64748b; font-size: .78rem; font-weight: 650; }
.bf-material__status { display: inline-block; margin-right: 4px; padding: 1px 8px; border-radius: 999px; background: #e2e8f0; color: #334155; font-size: .72rem; font-weight: 800; }
.bf-material__status--mastered { background: #1d4ed8; color: #ffffff; }
.bf-material__status--almost { background: #dbeafe; color: #1e3a8a; }
.bf-material__status--progress { background: #eff6ff; color: #1d4ed8; }
.bf-material__status--started { background: #f1f5f9; color: #334155; }
.bf-material__bar { height: 6px; border-radius: 999px; background: #e6edf7; overflow: hidden; }
.bf-material__bar span { display: block; height: 100%; background: #2563eb; border-radius: inherit; }
.bf-material__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.bf-material__actions button,
.bf-material__note-actions button { min-height: 44px; padding: 8px 12px; border: 1px solid #bfdbfe; border-radius: 12px; background: #eff6ff; color: #1d4ed8; font-size: .8rem; font-weight: 800; cursor: pointer; }
.bf-material__actions button.is-primary { background: #2563eb; border-color: #2563eb; color: #ffffff; }
.bf-material__actions button:disabled { opacity: .55; cursor: not-allowed; }
.bf-material button:focus-visible, .bf-material a:focus-visible, .bf-material textarea:focus-visible, .bf-qnote :is(summary, textarea, button):focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }

.bf-material__panel { padding: 0 16px 16px; border-top: 1px solid #edf1f7; }
.bf-material__block { margin-top: 14px; }
.bf-material__block h3 { margin: 0 0 6px; font-size: .85rem; font-weight: 850; color: #17243d; }
.bf-material__block p { margin: 0 0 8px; color: #334155; font-size: .88rem; line-height: 1.6; }
.bf-material__block ol { margin: 0; padding-left: 22px; list-style: decimal; color: #334155; font-size: .88rem; line-height: 1.6; }
.bf-material__law { margin: 12px 0 0; }
.bf-material__law a { display: inline-flex; align-items: center; gap: 6px; color: #1d4ed8; font-size: .85rem; font-weight: 800; }
.bf-material__law svg, .bf-material__empty svg { width: 16px; height: 16px; }
.bf-material__updated { margin: 8px 0 0; color: #64748b; font-size: .75rem; }
.bf-material__empty { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border: 1px dashed #bfdbfe; border-radius: 14px; background: #f8fbff; color: #334155; font-size: .85rem; }
.bf-material__empty p { margin: 0; }
.bf-material__notes textarea,
.bf-qnote textarea { width: 100%; min-height: 96px; padding: 10px 12px; border: 1px solid #94a3b8; border-radius: 12px; background: #ffffff; color: #0f172a; font: 600 .85rem/1.5 Manrope, system-ui, sans-serif; resize: vertical; }
.bf-material__note-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.bf-material__feedback { margin: 0; color: #64748b; font-size: .75rem; }

.bf-qnote { margin-top: 4px; padding: 10px 12px; border: 1px solid #dce5f2; border-radius: 14px; background: #f8fbff; }
.bf-qnote summary { min-height: 32px; display: flex; align-items: center; color: #1d4ed8; font-size: .85rem; font-weight: 800; cursor: pointer; }
.bf-qnote[open] summary { margin-bottom: 8px; }

.bf-guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.bf-guide__item { display: flex; gap: 12px; padding: 16px; border: 1px solid #dce5f2; border-radius: 18px; background: #ffffff; }
.bf-guide__icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #e7f0ff; color: #245ce5; }
.bf-guide__icon svg { width: 20px; height: 20px; }
.bf-guide__item h2 { margin: 0 0 4px; font-size: .95rem; font-weight: 850; }
.bf-guide__item p { margin: 0; color: #475569; font-size: .85rem; line-height: 1.55; }

@media (max-width: 720px) {
  .bf-material__topic-row { flex-direction: column; align-items: stretch; }
  .bf-material__actions { justify-content: stretch; }
  .bf-material__actions button { flex: 1; }
  .bf-guide { grid-template-columns: 1fr; }
}
