/* Matefacilito Studio v2 — estilos de los cuadernos de cálculo mental (pantalla e impresión). */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: block; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: block; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: block; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 800; font-display: block; src: url("fonts/inter-latin-800-normal.woff2") format("woff2"); }

.mf-page {
  --mf-ink: #102a26;
  --mf-teal: #08756f;
  --mf-teal-soft: #e3f3f1;
  --mf-coral: #d65f45;
  --mf-gold: #e8b94a;
  position: relative;
  overflow: hidden;
  margin: 0 auto 18px;
  background: #fff;
  color: var(--mf-ink);
  font-family: Inter, Arial, sans-serif;
  font-size: 11pt;
  line-height: 1.35;
  box-shadow: 0 10px 26px rgba(30, 45, 42, 0.14);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.mf-page * { box-sizing: border-box; }
.mf-notebook { position: absolute; z-index: 0; overflow: hidden; }
.mf-content { position: absolute; z-index: 1; display: flex; flex-direction: column; }
.mf-folio { position: absolute; left: 0; right: 0; bottom: 0; height: 0.26in; font-size: 10pt; font-weight: 700; color: #455a64; }
.mf-folio span { display: inline-block; min-width: 0.34in; text-align: center; padding: 2px 6px; border-radius: 10px; background: #fff; border: 1px solid #b0bec5; }

.mf-brandbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 2px solid var(--mf-teal); margin-bottom: 10px; }
.mf-brand { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 11pt; color: var(--mf-teal); white-space: nowrap; }
.mf-brand i { font-style: normal; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; background: var(--mf-teal); color: #fff; font-size: 10pt; }
.mf-brand.big { font-size: 20pt; }
.mf-brand.big i { width: 34px; height: 34px; font-size: 17pt; border-radius: 8px; }
.mf-booktitle { font-size: 9.5pt; font-weight: 600; color: #455a64; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mf-h2 { font-size: 20pt; font-weight: 800; margin: 4px 0 6px; line-height: 1.15; }
.mf-h2.center { text-align: center; }
.mf-lead { font-size: 12pt; margin: 0 0 12px; max-width: 7in; }
.mf-page h3 { font-size: 12.5pt; font-weight: 800; margin: 0 0 4px; }
.mf-page ul { margin: 0; padding-left: 18px; }
.mf-page li { margin: 3px 0; }

/* Portada */
.mf-cover { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; padding: 0.3in 0 0.2in; }
.mf-cover-kicker { font-size: 13pt; font-weight: 700; color: var(--mf-coral); text-transform: uppercase; letter-spacing: 0.04em; }
.mf-cover h1 { font-size: 34pt; line-height: 1.08; font-weight: 800; margin: 0; max-width: 6.6in; }
.mf-cover-badges { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.mf-cover-badges span { background: var(--mf-teal); color: #fff; font-weight: 700; padding: 6px 14px; border-radius: 999px; font-size: 12pt; }
.mf-cover-desc { font-size: 13pt; max-width: 5.8in; margin: 0; }
.mf-owner { font-size: 13pt; font-weight: 700; display: flex; align-items: flex-end; gap: 8px; width: 5.6in; }
.mf-owner span { flex: 1; border-bottom: 2px solid var(--mf-ink); height: 22px; }
.mf-cover-foot { font-size: 9.5pt; color: #546e7a; }

.mf-copyright { margin-top: auto; margin-bottom: 0.5in; font-size: 10pt; color: #37474f; max-width: 5.5in; }
.mf-copyright p { margin: 0 0 8px; }

/* Tutorial */
.mf-steps3 { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 8px; margin: 6px 0 14px; }
.mf-step { background: #fff; border: 2px solid var(--mf-teal); border-radius: 12px; padding: 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mf-step p { margin: 0; font-size: 11pt; }
.mf-stepn, .mf-pn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--mf-coral); color: #fff; font-weight: 800; font-size: 13pt; flex: none; }
.mf-arrow { align-self: center; font-size: 22pt; font-weight: 800; color: var(--mf-teal); }
.mf-tips { background: #fff; border: 1.5px dashed #90a4ae; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 11pt; }
.mf-tips.two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.mf-practice { list-style: none; padding: 0 !important; font-size: 13pt; font-weight: 700; }
.mf-practice i { display: inline-block; width: 0.6in; border-bottom: 1.5px solid var(--mf-ink); }
.mf-adult { background: var(--mf-teal-soft); border-left: 5px solid var(--mf-teal); border-radius: 8px; padding: 10px 14px; font-size: 10.5pt; }

/* Clave de colores */
.mf-key { background: #fff; border: 1.5px solid #90a4ae; border-radius: 10px; padding: 6px 10px; }
.mf-key-title { font-size: 9.5pt; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: #455a64; margin-bottom: 4px; }
.mf-key-items { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.mf-key-item { display: flex; align-items: center; gap: 7px; min-width: 1.3in; }
.mf-key.is-compact .mf-key-items { flex-direction: column; gap: 5px; }
.mf-swatch { display: inline-block; flex: none; border: 1.5px solid #263238; border-radius: 4px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.mf-key-text { display: flex; flex-direction: column; line-height: 1.1; white-space: nowrap; }
.mf-key-text b { font-size: 12pt; font-weight: 800; }
.mf-key-text small { font-size: 9.5pt; color: #455a64; }
.mf-key-item.big .mf-key-text b { font-size: 15pt; }
.mf-key-item.big .mf-key-text small { font-size: 11pt; }

/* SVG */
.mf-label { font-family: Inter, Arial, sans-serif; font-weight: 700; fill: #102a26; }
.mf-svgtxt { font-family: Inter, Arial, sans-serif; font-weight: 600; fill: #102a26; }
.mf-svgtxt.strong { font-weight: 800; }
.mf-grid { display: block; }

/* Calentamiento */
.mf-warm { display: flex; gap: 18px; align-items: center; margin-bottom: 12px; }
.mf-warm-grid { flex: none; background: #fff; }
.mf-warm-side { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.mf-warm-title { font-size: 13pt; font-weight: 800; color: var(--mf-teal); }
.mf-note { font-size: 10.5pt; margin: 0; }

/* Paso a paso */
.mf-pas { list-style: none; padding: 0 !important; margin: 0 0 10px; display: flex; flex-direction: column; gap: 8px; }
.mf-pas > li { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1.5px solid #cfd8dc; border-radius: 10px; padding: 8px 12px; margin: 0; }
.mf-pas > li > div { flex: 1; }
.mf-pas p { margin: 0 0 4px; font-size: 11pt; }
.mf-bigop { font-size: 20pt; font-weight: 800; letter-spacing: 0.02em; }
.mf-bigop b { color: var(--mf-coral); }
.mf-visual { margin-top: 4px; }
.mf-row { display: flex; align-items: center; gap: 14px; }
.mf-row p { margin: 0; }
.mf-pvwrap { display: flex; align-items: center; gap: 14px; }
.mf-pv { border-collapse: collapse; font-size: 15pt; font-weight: 800; }
.mf-pv th { font-size: 10pt; color: #fff; background: var(--mf-teal); padding: 2px 10px; border: 1px solid var(--mf-teal); }
.mf-pv td { width: 0.42in; height: 0.36in; text-align: center; border: 1px solid #90a4ae; background: #fff; }
.mf-pv td.mf-pv-sym { border: 0; background: transparent; color: var(--mf-coral); width: 0.3in; }
.mf-pv tr.res td:not(.mf-pv-sym) { border-top: 2.5px solid var(--mf-ink); color: var(--mf-coral); }
.mf-pv-legend { font-size: 10pt; color: #455a64; }
.mf-skip { display: flex; flex-wrap: wrap; gap: 6px; }
.mf-bubble { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 0.56in; height: 0.56in; border-radius: 50%; border: 2px solid var(--mf-teal); background: #fff; }
.mf-bubble b { font-size: 13pt; line-height: 1; }
.mf-bubble small { font-size: 7.5pt; color: #546e7a; }
.mf-bubble.is-target { background: var(--mf-gold); border-color: var(--mf-coral); }
.mf-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14pt; font-weight: 800; }
.mf-chain span { background: #fff; border: 1.5px solid #90a4ae; border-radius: 8px; padding: 3px 9px; white-space: nowrap; }
.mf-chain span:last-child { background: var(--mf-gold); border-color: var(--mf-coral); }
.mf-chain i { font-style: normal; color: var(--mf-teal); }

/* Reto */
.mf-ws-head { flex: none; display: flex; flex-direction: column; }
.mf-ws-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mf-ws-title h2 { font-size: 15pt; font-weight: 800; margin: 0; white-space: nowrap; }
.mf-counters { display: flex; gap: 9px; font-size: 9.5pt; font-weight: 700; white-space: nowrap; }
.mf-counters i { display: inline-block; width: 0.45in; border-bottom: 1.3px solid var(--mf-ink); }
.mf-counters i.w { width: 1in; }
.mf-instr { margin: 4px 0 0; font-size: 10.5pt; color: #37474f; }
.mf-ws-grid { flex: none; display: flex; align-items: center; justify-content: center; margin-top: 0.1in; }
.mf-ws-key { flex: none; margin-top: 0.12in; }

/* Prueba de colores */
.mf-testgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.mf-test { display: flex; flex-direction: column; gap: 6px; }
.mf-test-box { height: 1.2in; border: 1.5px solid #90a4ae; border-radius: 10px; background: #fff; }

/* Crea tu propio */
.mf-create { display: flex; justify-content: center; margin-bottom: 12px; }
.mf-ownkey { width: 100%; border-collapse: collapse; background: #fff; font-size: 10pt; }
.mf-ownkey th { background: var(--mf-teal); color: #fff; padding: 3px; }
.mf-ownkey td { border: 1px solid #90a4ae; height: 0.34in; }

/* Soluciones */
.mf-solgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 20px; justify-items: center; }
.mf-solgrid figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mf-solgrid figcaption { font-size: 10.5pt; }

/* Invitación */
.mf-invite { display: flex; flex-direction: column; justify-content: center; gap: 22px; flex: 1; padding-bottom: 0.5in; }
.mf-cert { background: #fff; border: 4px double var(--mf-gold); border-radius: 14px; padding: 16px 24px; text-align: center; font-size: 12.5pt; }
.mf-cert p { margin: 4px 0; }
.mf-line { height: 30px; border-bottom: 2px solid var(--mf-ink); margin: 0 auto 6px; width: 70%; }
.mf-cert-sign { display: flex; justify-content: space-around; margin-top: 14px; font-size: 11pt; }
.mf-cert-sign i { display: inline-block; width: 1.4in; border-bottom: 1.3px solid var(--mf-ink); }
.mf-share { display: flex; gap: 22px; align-items: center; background: #fff; border: 2px solid var(--mf-teal); border-radius: 14px; padding: 16px; }
.mf-qrbox { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.mf-qrbox small { font-size: 9.5pt; font-weight: 700; color: #37474f; }
.mf-share-text h3 { font-size: 16pt; color: var(--mf-teal); }
.mf-share-text p { margin: 0 0 8px; font-size: 12pt; }
.mf-adult-mini { font-size: 10.5pt !important; background: var(--mf-teal-soft); padding: 8px 10px; border-radius: 8px; }

/* Llamadas para regiones muy pequeñas */
.mf-callouts { flex: none; display: flex; flex-wrap: wrap; align-content: center; gap: 4px 14px; margin-top: 0.08in; padding: 0 4px; font-size: 11pt; }
.mf-callouts b { font-size: 10pt; color: #455a64; margin-right: 2px; }
.mf-callouts span { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; white-space: nowrap; }
.mf-callouts i { font-style: normal; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.2px solid var(--mf-teal); font-size: 10pt; font-weight: 800; }
.mf-callout-letter { fill: #08756f; font-weight: 800; }

/* Personalización */
.mf-counters em { font-style: normal; font-weight: 800; font-size: 10pt; color: var(--mf-teal); position: relative; top: -2px; }
.mf-line { display: flex; align-items: flex-end; justify-content: center; }
.mf-line span { font-size: 20pt; font-weight: 800; color: var(--mf-teal); line-height: 1; padding-bottom: 2px; }
.mf-owner span { font-size: 15pt; font-weight: 800; color: var(--mf-teal); text-align: center; line-height: 22px; }
.mf-dedi-box { margin: auto; max-width: 5.6in; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; background: #fff; border: 2px solid var(--mf-coral); border-radius: 18px; padding: 0.45in 0.5in; }
.mf-dedi-box h2 { font-size: 24pt; margin: 0; color: var(--mf-coral); }
.mf-dedi-box p { font-size: 15pt; line-height: 1.5; margin: 0; }
.mf-dedication-from { font-size: 13pt; font-weight: 700; color: var(--mf-teal); }

/* Índice */
.mf-toc { list-style: none; padding: 0 !important; margin: 4px 0 16px; font-size: 13pt; }
.mf-toc li { display: flex; align-items: baseline; gap: 8px; margin: 6px 0; }
.mf-toc i { flex: 1; border-bottom: 1.5px dotted #90a4ae; }
.mf-toc b { min-width: 0.3in; text-align: right; }
.mf-toc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.mf-toc-grid figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mf-toc-grid figcaption { font-size: 10.5pt; font-weight: 700; }

/* Interfaz de la pestaña */
.mf-artlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.mf-artcard { display: flex; align-items: center; gap: 10px; background: var(--paper, #fff); border: 1px solid var(--line, #d9ddd2); border-radius: 8px; padding: 8px; cursor: pointer; }
.mf-artcard.has-warn { border-color: #e8b94a; }
.mf-artcard span { display: flex; flex-direction: column; }
.mf-artcard small { color: #66736d; }
.mf-checks { display: grid; gap: 6px; margin: 6px 0 10px; }
.mf-checks label { display: flex; gap: 8px; align-items: flex-start; font-size: 0.92rem; }
.mf-urlpreview { word-break: break-all; font-size: 0.8rem; }
.mf-personal { border: 1px dashed var(--line, #d9ddd2); border-radius: 8px; padding: 8px 10px; margin: 8px 0; display: grid; gap: 8px; }
.mf-personal legend { font-weight: 700; padding: 0 4px; }
.mf-personal textarea { width: 100%; font: inherit; }

@media print {
  .print-preview.is-mental { display: block !important; padding: 0 !important; gap: 0 !important; background: #fff !important; }
  .mf-page { margin: 0 !important; box-shadow: none !important; break-after: page; page-break-after: always; break-inside: avoid; }
  .mf-page:last-child { break-after: auto; page-break-after: auto; }
}
