:root {
  --mack-red: #D71920;
  --mack-red-dark: #9F111A;
  --mack-red-deep: #6F0B12;
  --mack-red-soft: #FFF1F2;
  --mack-red-soft-2: #FFE4E6;
  --mack-black: #111217;
  --mack-ink: #272A32;
  --mack-gray: #F5F6F8;
  --mack-gray-2: #E7E9EE;
  --mack-gray-3: #6B7280;
  --mack-gray-4: #9CA3AF;
  --mack-white: #FFFFFF;
  --green-ok: #16A34A;
  --green-soft: #DCFCE7;
  --red-err: #DC2626;
  --red-soft: #FEF2F2;
  --amber: #D97706;
  --amber-soft: #FEF3C7;
  --blue-info: #2563EB;
  --blue-soft: #DBEAFE;
  --violet: #6D28D9;
  --shadow-sm: 0 10px 30px rgba(17, 18, 23, 0.08);
  --shadow-md: 0 18px 60px rgba(17, 18, 23, 0.14);
  --shadow-lg: 0 28px 90px rgba(17, 18, 23, 0.22);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --max: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}

html, body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(215, 25, 32, 0.11), transparent 32rem),
    radial-gradient(circle at top right, rgba(17, 18, 23, 0.09), transparent 26rem),
    linear-gradient(180deg, #FFFFFF 0%, #F6F7FB 38%, #F1F3F7 100%);
  color: var(--mack-black);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(17,18,23,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,18,23,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.65), transparent 70%);
  z-index: -1;
}

a { color: var(--mack-red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* -------------------------------------------------------------------------- */
/* HEADER                                                                     */
/* -------------------------------------------------------------------------- */
.header {
  color: white;
  padding: 14px 22px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background:
    linear-gradient(135deg, rgba(111, 11, 18, 0.96), rgba(215, 25, 32, 0.94)),
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.2), transparent 22rem);
  border-bottom: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 12px 34px rgba(111, 11, 18, 0.22);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-dot {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  font-weight: 900;
  letter-spacing: -1px;
}
.header h1 {
  font-size: clamp(15px, 2.4vw, 18px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.header .tag {
  font-size: 11px;
  opacity: 0.86;
  margin-top: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.session-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.session-bar .student-name,
.session-pill {
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.18);
  color: white;
  padding: 8px 12px;
  border-radius: 999px;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.session-bar .timer {
  background: white;
  color: var(--mack-red-dark);
  padding: 8px 13px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 8px 26px rgba(0,0,0,.18);
}

/* -------------------------------------------------------------------------- */
/* LAYOUT                                                                     */
/* -------------------------------------------------------------------------- */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 34px 22px;
}
.container-wide { max-width: var(--max); }
.container-full { max-width: var(--max); }

.page-title {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.055em;
  margin-bottom: 10px;
  color: var(--mack-black);
}
.page-subtitle {
  color: var(--mack-gray-3);
  font-size: 16px;
  margin-bottom: 28px;
  max-width: 720px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mack-red-dark);
  margin-bottom: 12px;
}
.kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--mack-red);
  border-radius: 999px;
}

/* -------------------------------------------------------------------------- */
/* LANDING                                                                    */
/* -------------------------------------------------------------------------- */
.landing-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 52px 22px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.72fr);
  gap: 28px;
  align-items: stretch;
}
.hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  min-height: 560px;
  padding: clamp(28px, 5vw, 56px);
  color: white;
  background:
    linear-gradient(140deg, rgba(111, 11, 18, .96), rgba(215, 25, 32, .91)),
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.26), transparent 24rem);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}
.hero-panel::before,
.hero-panel::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255,255,255,.11);
  z-index: -1;
}
.hero-panel::before {
  width: 360px;
  height: 360px;
  right: -140px;
  top: -80px;
}
.hero-panel::after {
  width: 280px;
  height: 280px;
  left: -120px;
  bottom: -120px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-title {
  font-size: clamp(42px, 7vw, 78px);
  line-height: .86;
  letter-spacing: -.07em;
  max-width: 760px;
  margin-bottom: 24px;
  font-weight: 950;
}
.hero-copy {
  max-width: 670px;
  font-size: clamp(17px, 2.3vw, 21px);
  color: rgba(255,255,255,.86);
  line-height: 1.48;
  margin-bottom: 34px;
}
.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 34px;
}
.hero-metric {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(10px);
}
.hero-metric strong { display: block; font-size: 26px; line-height: 1; }
.hero-metric span { display: block; margin-top: 7px; font-size: 12px; color: rgba(255,255,255,.75); }

.login-panel {
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 28px;
  backdrop-filter: blur(18px);
  align-self: stretch;
}
.login-panel .card { margin-bottom: 0; box-shadow: none; border: 0; background: transparent; padding: 0; }
.login-panel h2 { font-size: 26px; letter-spacing: -.035em; }

.next-lessons-card {
  max-width: var(--max);
  margin: 0 auto 34px;
  padding: 0 22px;
}

/* -------------------------------------------------------------------------- */
/* CARD + FORM                                                                */
/* -------------------------------------------------------------------------- */
.card {
  background: rgba(255,255,255,.88);
  border-radius: var(--radius-md);
  padding: clamp(20px, 3vw, 30px);
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(231, 233, 238, .92);
  backdrop-filter: blur(14px);
}
.card h2 {
  font-size: clamp(19px, 2vw, 26px);
  font-weight: 850;
  margin-bottom: 6px;
  letter-spacing: -0.035em;
}
.card .subtitle {
  font-size: 14px;
  color: var(--mack-gray-3);
  margin-bottom: 20px;
  line-height: 1.55;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--mack-red-soft);
  color: var(--mack-red-dark);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(215,25,32,.12);
}
.badge-gray { background: var(--mack-gray); color: var(--mack-gray-3); border-color: var(--mack-gray-2); }
.badge-green { background: var(--green-soft); color: #166534; border-color: #bbf7d0; }
.badge-amber { background: var(--amber-soft); color: #92400e; border-color: #fde68a; }
.badge-blue { background: var(--blue-soft); color: #1e40af; border-color: #bfdbfe; }
.badge-dark { background: rgba(17,18,23,.08); color: var(--mack-black); border-color: rgba(17,18,23,.08); }

label {
  display: block;
  font-size: 13px;
  font-weight: 750;
  margin-bottom: 7px;
  color: var(--mack-ink);
}
label .req { color: var(--mack-red); margin-left: 2px; }
label .hint { font-weight: 500; color: var(--mack-gray-3); font-size: 12px; }

input, textarea, select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--mack-gray-2);
  border-radius: 14px;
  font-size: 15px;
  font-family: inherit;
  background: rgba(255,255,255,.92);
  color: var(--mack-black);
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(215,25,32,.64);
  box-shadow: 0 0 0 4px rgba(215,25,32,.10), inset 0 1px 0 rgba(255,255,255,.85);
  background: white;
}
textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
input[disabled], textarea[disabled], select[disabled] {
  background: var(--mack-gray);
  cursor: not-allowed;
  opacity: 0.78;
}

.field { margin-bottom: 16px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field-error {
  font-size: 12px;
  color: var(--red-err);
  margin-top: 5px;
}
input.has-error, textarea.has-error, select.has-error { border-color: var(--red-err); }

.btn {
  background: linear-gradient(135deg, var(--mack-red), var(--mack-red-dark));
  color: white;
  border: none;
  padding: 13px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter .14s ease, background .14s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: inherit;
  box-shadow: 0 12px 28px rgba(215,25,32,.24);
  text-decoration: none !important;
}
.btn:hover:not(:disabled) { filter: brightness(.98); transform: translateY(-1px); box-shadow: 0 16px 36px rgba(215,25,32,.30); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.52; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary {
  background: white;
  color: var(--mack-black);
  border: 1px solid var(--mack-gray-2);
  box-shadow: 0 8px 22px rgba(17,18,23,.07);
}
.btn-secondary:hover:not(:disabled) { background: #FAFAFB; border-color: var(--mack-gray-3); box-shadow: 0 12px 28px rgba(17,18,23,.10); }
.btn-ghost {
  background: transparent;
  color: var(--mack-gray-3);
  border: 1px solid transparent;
  box-shadow: none;
  padding: 10px 14px;
}
.btn-ghost:hover:not(:disabled) { background: var(--mack-gray); color: var(--mack-black); box-shadow: none; }
.btn-block { width: 100%; }
.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.status {
  padding: 14px 15px;
  border-radius: 16px;
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  line-height: 1.52;
  border: 1px solid transparent;
}
.status-ok { background: #F0FDF4; color: #166534; border-color: #BBF7D0; }
.status-err { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.status-warn { background: #FFFBEB; color: #92400E; border-color: #FED7AA; }
.status-info { background: #EFF6FF; color: #1E40AF; border-color: #BFDBFE; }
.status-icon { font-weight: 900; flex-shrink: 0; }

.mini-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--mack-gray-3);
  font-weight: 750;
}
.mini-status.saving { color: var(--blue-info); }
.mini-status.saved { color: var(--green-ok); }
.mini-status.error { color: var(--red-err); }
.mini-status.pending { color: var(--amber); }

/* -------------------------------------------------------------------------- */
/* MODERN FLOW                                                                */
/* -------------------------------------------------------------------------- */
.aula-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 22px 40px;
}
.aula-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4vw, 44px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 86% 0%, rgba(215,25,32,.24), transparent 28rem),
    linear-gradient(135deg, rgba(255,255,255,.88), rgba(255,255,255,.72));
  border: 1px solid rgba(255,255,255,.78);
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  backdrop-filter: blur(16px);
}
.aula-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px;
  align-items: end;
}
.aula-title {
  font-size: clamp(34px, 5vw, 62px);
  line-height: .9;
  letter-spacing: -.07em;
  font-weight: 950;
  max-width: 820px;
  margin: 12px 0 16px;
}
.aula-copy {
  max-width: 760px;
  color: var(--mack-gray-3);
  font-size: 16px;
}
.aula-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(105px, 1fr));
  gap: 10px;
  min-width: 360px;
}
.stat-pill {
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(231,233,238,.9);
  border-radius: 18px;
  padding: 15px;
  box-shadow: 0 10px 24px rgba(17,18,23,.06);
}
.stat-pill span {
  display: block;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--mack-gray-3);
}
.stat-pill strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.flow-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.flow-sidebar {
  position: sticky;
  top: 88px;
}
.flow-panel {
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(255,255,255,.86);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  overflow: hidden;
}
.flow-panel-header {
  padding: 20px 20px 14px;
  border-bottom: 1px solid rgba(231,233,238,.82);
}
.flow-panel-header h3 {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--mack-gray-3);
}
.flow-progress-bar {
  height: 10px;
  background: rgba(17,18,23,.08);
  border-radius: 999px;
  margin-top: 14px;
  overflow: hidden;
}
.flow-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--mack-red), var(--mack-red-dark));
  border-radius: inherit;
  transition: width .35s ease;
}
.progress-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}
.progress-item {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--mack-gray-3);
  border-radius: 16px;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  padding: 10px 10px;
  font-family: inherit;
  transition: background .16s, color .16s, border-color .16s, transform .16s;
}
.progress-item:hover:not(:disabled) { background: rgba(17,18,23,.045); color: var(--mack-black); }
.progress-item:disabled { opacity: .55; cursor: not-allowed; }
.progress-item .step-number {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid var(--mack-gray-2);
  font-weight: 900;
  color: var(--mack-gray-3);
  box-shadow: 0 6px 14px rgba(17,18,23,.05);
}
.progress-item .step-text strong {
  display: block;
  font-size: 13px;
  line-height: 1.15;
  color: inherit;
}
.progress-item .step-text span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--mack-gray-4);
}
.progress-item .step-state {
  font-size: 11px;
  font-weight: 900;
  color: var(--mack-gray-4);
}
.progress-item.current {
  background: var(--mack-red-soft);
  color: var(--mack-red-dark);
  border-color: rgba(215,25,32,.18);
  transform: translateX(2px);
}
.progress-item.current .step-number {
  background: linear-gradient(135deg, var(--mack-red), var(--mack-red-dark));
  color: white;
  border-color: transparent;
}
.progress-item.done {
  background: #F0FDF4;
  color: #166534;
  border-color: #BBF7D0;
}
.progress-item.done .step-number {
  background: #16A34A;
  border-color: #16A34A;
  color: white;
}
.progress-item.available:not(.current):not(.done) .step-number { color: var(--mack-black); }

.flow-stage {
  min-width: 0;
}
.stage-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(255,255,255,.86);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  backdrop-filter: blur(16px);
}
.stage-toolbar-title strong {
  display: block;
  font-size: 15px;
  letter-spacing: -.02em;
}
.stage-toolbar-title span {
  display: block;
  color: var(--mack-gray-3);
  font-size: 12px;
  margin-top: 2px;
}
.stage-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.activity-step-card {
  display: none;
  min-height: 560px;
  padding: clamp(22px, 4vw, 40px);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.activity-step-card.active {
  display: block;
  animation: stepIn .28s ease both;
}
@keyframes stepIn {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.activity-step-card::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 8px;
  background: linear-gradient(90deg, var(--mack-red), var(--mack-red-dark), var(--mack-black));
}
.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}
.activity-header-main {
  min-width: 0;
}
.activity-header h2 {
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: .94;
  letter-spacing: -.06em;
}
.activity-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--mack-gray-3);
  margin-top: 12px;
}
.activity-meta strong { color: var(--mack-black); }
.activity-index-chip {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--mack-red), var(--mack-red-dark));
  font-size: 28px;
  font-weight: 950;
  box-shadow: 0 18px 44px rgba(215,25,32,.28);
}
.activity-complete-panel {
  display: none;
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(240,253,244,.92), rgba(255,255,255,.88));
  border: 1px solid #BBF7D0;
}
.activity-complete-panel.active { display: block; animation: stepIn .25s ease both; }
.activity-complete-panel.pending {
  background: linear-gradient(135deg, rgba(255,251,235,.94), rgba(255,255,255,.88));
  border-color: #FED7AA;
}
.complete-panel-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}
.complete-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green-ok);
  color: white;
  font-weight: 900;
}
.pending .complete-icon { background: var(--amber); }
.complete-panel-content strong { display: block; font-size: 15px; }
.complete-panel-content span { display: block; margin-top: 2px; font-size: 13px; color: var(--mack-gray-3); }
.finish-card {
  display: none;
  min-height: 420px;
}
.finish-card.active { display: block; animation: stepIn .25s ease both; }

.activity-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  gap: 10px;
  flex-wrap: wrap;
}
.activity-nav-info {
  color: var(--mack-gray-3);
  font-size: 13px;
}

/* -------------------------------------------------------------------------- */
/* LEGACY PROGRESS MAP                                                        */
/* -------------------------------------------------------------------------- */
.progress-map {
  background: rgba(255,255,255,.86);
  border: 1px solid var(--mack-gray-2);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.progress-map h3 {
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mack-gray-3);
  margin-bottom: 12px;
}

/* -------------------------------------------------------------------------- */
/* ACTIVITY COMPONENTS                                                        */
/* -------------------------------------------------------------------------- */
.classify-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 18px 0;
}
.classify-item {
  background: rgba(245,246,248,.86);
  border: 1px solid var(--mack-gray-2);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.classify-item-text { font-size: 14px; font-weight: 750; }
.classify-buttons { display: flex; gap: 8px; }
.classify-btn {
  flex: 1;
  padding: 9px 10px;
  border: 1px solid var(--mack-gray-2);
  background: white;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.classify-btn:hover:not(:disabled) { border-color: var(--mack-gray-3); transform: translateY(-1px); }
.classify-btn.selected { background: var(--mack-red); color: white; border-color: var(--mack-red); box-shadow: 0 8px 20px rgba(215,25,32,.20); }
.classify-btn:disabled { cursor: default; }
.classify-item.feedback-correct { background: #F0FDF4; border-color: #BBF7D0; }
.classify-item.feedback-wrong { background: #FEF2F2; border-color: #FECACA; }
.classify-feedback { font-size: 12px; margin-top: 4px; font-weight: 750; }
.classify-feedback.correct { color: #166534; }
.classify-feedback.wrong { color: #991B1B; }

.classify-grid-wide { grid-template-columns: 1fr; }
.classify-buttons-three { flex-wrap: wrap; }
.classify-buttons-three .classify-btn { min-width: 160px; }
.classify-btn.correct-choice,
.quiz-option.correct-choice {
  background: #16A34A !important;
  color: white !important;
  border-color: #16A34A !important;
  box-shadow: 0 10px 24px rgba(22,163,74,.18) !important;
}
.classify-btn.wrong-choice,
.quiz-option.wrong-choice {
  background: var(--mack-red) !important;
  color: white !important;
  border-color: var(--mack-red) !important;
  box-shadow: 0 10px 24px rgba(215,25,32,.18) !important;
}


.ordering-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
}
.ordering-item {
  background: rgba(245,246,248,.86);
  border: 1px solid var(--mack-gray-2);
  border-radius: 18px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.ordering-handle {
  background: white;
  border: 1px solid var(--mack-gray-2);
  border-radius: 13px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  color: var(--mack-red-dark);
  flex-shrink: 0;
}
.ordering-text { flex: 1; font-weight: 750; }
.ordering-controls { display: flex; gap: 5px; }
.ordering-arrow {
  background: white;
  border: 1px solid var(--mack-gray-2);
  border-radius: 12px;
  width: 36px;
  height: 32px;
  cursor: pointer;
  font-size: 15px;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--mack-gray-3);
  transition: all .15s;
}
.ordering-arrow:hover:not(:disabled) { background: var(--mack-gray); color: var(--mack-black); transform: translateY(-1px); }
.ordering-arrow:disabled { opacity: 0.35; cursor: not-allowed; }

.quiz-question {
  background: rgba(245,246,248,.86);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 13px;
  border: 1px solid transparent;
}
.quiz-question-text {
  font-size: 14px;
  margin-bottom: 12px;
  font-weight: 650;
  line-height: 1.55;
}
.quiz-options { display: flex; gap: 9px; flex-wrap: wrap; }
.quiz-option {
  flex: 1;
  min-width: 110px;
  padding: 10px 12px;
  border: 1px solid var(--mack-gray-2);
  background: white;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.quiz-option:hover:not(:disabled) { border-color: var(--mack-gray-3); transform: translateY(-1px); }
.quiz-option.selected { background: var(--mack-red); color: white; border-color: var(--mack-red); box-shadow: 0 8px 20px rgba(215,25,32,.20); }
.quiz-option:disabled { cursor: default; }
.quiz-question.feedback-correct { background: #F0FDF4; border-color: #BBF7D0; }
.quiz-question.feedback-wrong { background: #FEF2F2; border-color: #FECACA; }
.quiz-feedback {
  font-size: 12px;
  margin-top: 10px;
  padding: 10px 11px;
  border-radius: 12px;
  background: rgba(255,255,255,0.72);
  line-height: 1.5;
  font-weight: 650;
}
.quiz-feedback.correct { color: #166534; }
.quiz-feedback.wrong { color: #991B1B; }

/* -------------------------------------------------------------------------- */
/* PROTOCOL                                                                   */
/* -------------------------------------------------------------------------- */
.protocol-card {
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(255,255,255,.82);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 44px);
  text-align: center;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}
.protocol-card::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 9px;
  background: linear-gradient(90deg, var(--green-ok), var(--mack-red));
}
.protocol-icon {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: var(--green-ok);
  color: white;
  margin: 0 auto 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 900;
  box-shadow: 0 18px 44px rgba(22,163,74,.26);
}
.protocol-title {
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 950;
  letter-spacing: -.06em;
  line-height: .96;
  margin-bottom: 10px;
}
.protocol-subtitle {
  color: var(--mack-gray-3);
  font-size: 16px;
  margin: 0 auto 28px;
  max-width: 620px;
}
.protocol-data {
  text-align: left;
  background: rgba(245,246,248,.9);
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 22px;
  border: 1px solid var(--mack-gray-2);
}
.protocol-data dl {
  display: grid;
  grid-template-columns: minmax(140px, auto) 1fr;
  gap: 10px 18px;
  font-size: 13px;
}
.protocol-data dt { color: var(--mack-gray-3); font-weight: 750; }
.protocol-data dd { font-weight: 850; word-break: break-word; }
.protocol-code {
  font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
  background: white;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--mack-gray-2);
  margin-top: 8px;
  display: inline-block;
  font-size: 12px;
  font-weight: 850;
}

/* -------------------------------------------------------------------------- */
/* HELPERS                                                                    */
/* -------------------------------------------------------------------------- */
.fields-list { list-style: none; padding: 0; }
.fields-list li { font-size: 13px; padding: 4px 0; color: var(--mack-gray-3); }
.fields-list li::before { content: "→ "; color: var(--mack-red); font-weight: 900; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.muted { color: var(--mack-gray-3); }
.small { font-size: 12px; }
.spacer { height: 24px; }
.divider { height: 1px; background: var(--mack-gray-2); margin: 22px 0; }
.privacy-note {
  font-size: 12px;
  color: var(--mack-gray-3);
  background: rgba(245,246,248,.82);
  border: 1px solid var(--mack-gray-2);
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 16px;
  line-height: 1.5;
}
.footer {
  text-align: center;
  font-size: 12px;
  color: var(--mack-gray-3);
  padding: 28px;
  margin-top: 16px;
  line-height: 1.6;
}
.checklist-section { margin-bottom: 22px; }
.checklist-section h3 {
  font-size: 15px;
  font-weight: 850;
  margin-bottom: 10px;
  color: var(--mack-red-dark);
  letter-spacing: -.02em;
}
.checklist-items {
  list-style: none;
  font-size: 14px;
}
.checklist-items li {
  padding: 8px 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.checklist-items li::before {
  content: "□";
  color: var(--mack-red);
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1.2;
}
code {
  background: var(--mack-gray);
  padding: 3px 7px;
  border-radius: 7px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

/* -------------------------------------------------------------------------- */
/* RESPONSIVE                                                                 */
/* -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .landing-hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero-panel { min-height: auto; }
  .flow-layout { grid-template-columns: 1fr; }
  .flow-sidebar { position: relative; top: auto; }
  .progress-list { flex-direction: row; overflow-x: auto; padding-bottom: 16px; }
  .progress-item { min-width: 236px; }
  .aula-hero-grid { grid-template-columns: 1fr; }
  .aula-stats { min-width: 0; width: 100%; }
}
@media (max-width: 680px) {
  .header { padding: 12px 14px; }
  .header-inner { align-items: flex-start; }
  .logo-dot { width: 36px; height: 36px; border-radius: 12px; }
  .session-bar { width: 100%; justify-content: flex-start; }
  .container, .aula-shell { padding: 20px 14px 30px; }
  .landing-hero { padding: 24px 14px 16px; }
  .hero-panel, .login-panel, .aula-hero, .flow-panel, .activity-step-card, .protocol-card { border-radius: 22px; }
  .hero-grid, .aula-stats { grid-template-columns: 1fr; }
  .field-row, .classify-grid { grid-template-columns: 1fr; }
  .activity-header { flex-direction: column-reverse; }
  .activity-index-chip { width: 52px; height: 52px; border-radius: 18px; font-size: 23px; }
  .stage-toolbar { align-items: flex-start; flex-direction: column; }
  .stage-actions { width: 100%; justify-content: stretch; }
  .stage-actions .btn { flex: 1; }
  .complete-panel-content { grid-template-columns: 1fr; text-align: center; }
  .complete-icon { margin: 0 auto; }
  .btn-row, .activity-nav { flex-direction: column; }
  .btn-row .btn, .activity-nav .btn { width: 100%; }
  .protocol-data dl { grid-template-columns: 1fr; }
}

/* Activity live timer */
.activity-live-timer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 241, 242, .96), rgba(255, 255, 255, .92));
  border: 1px solid rgba(215, 25, 32, .16);
  box-shadow: 0 12px 26px rgba(17, 18, 23, .06);
  color: var(--mack-red-dark);
}
.live-timer-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--mack-red);
  box-shadow: 0 0 0 0 rgba(215, 25, 32, .44);
  animation: timerPulse 1.45s ease-out infinite;
}
.live-timer-label {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--mack-red-dark);
}
.activity-live-timer strong {
  min-width: 52px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  letter-spacing: -.03em;
  color: var(--mack-black);
}

.activity-live-timer.is-warning {
  background: linear-gradient(135deg, rgba(255, 251, 235, .96), rgba(255, 255, 255, .92));
  border-color: rgba(245, 158, 11, .32);
  color: #92400e;
}
.activity-live-timer.is-warning .live-timer-dot {
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(245, 158, 11, .46);
}
.activity-live-timer.is-warning .live-timer-label { color: #92400e; }
.activity-live-timer.is-expired {
  background: linear-gradient(135deg, rgba(254, 242, 242, .96), rgba(255, 255, 255, .92));
  border-color: rgba(239, 68, 68, .30);
  color: #991b1b;
}
.activity-live-timer.is-expired .live-timer-dot {
  background: var(--red-err);
  animation: none;
}
.activity-live-timer.is-expired .live-timer-label { color: #991b1b; }
.activity-live-timer.is-complete {
  background: linear-gradient(135deg, rgba(240, 253, 244, .96), rgba(255, 255, 255, .92));
  border-color: rgba(22, 163, 74, .24);
  color: #166534;
}
.activity-live-timer.is-complete .live-timer-dot {
  background: var(--green-ok);
  animation: none;
}
.activity-live-timer.is-complete .live-timer-label { color: #166534; }
@keyframes timerPulse {
  0% { box-shadow: 0 0 0 0 rgba(215, 25, 32, .44); }
  72% { box-shadow: 0 0 0 9px rgba(215, 25, 32, 0); }
  100% { box-shadow: 0 0 0 0 rgba(215, 25, 32, 0); }
}
.footer strong {
  color: var(--mack-black);
}
@media (max-width: 560px) {
  .activity-live-timer {
    width: 100%;
    justify-content: space-between;
    border-radius: 18px;
  }
  .activity-live-timer strong {
    min-width: auto;
  }
}

/* -------------------------------------------------------------------------- */
/* CASE DOWNLOAD + FINAL REPORT                                                */
/* -------------------------------------------------------------------------- */
.case-download-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0 24px;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 241, 242, .95), rgba(255, 255, 255, .96)),
    radial-gradient(circle at top right, rgba(215, 25, 32, .12), transparent 16rem);
  border: 1px solid rgba(215, 25, 32, .14);
  box-shadow: 0 12px 34px rgba(17,18,23,.06);
}
.case-download-panel strong {
  display: block;
  font-size: 17px;
  color: var(--mack-black);
  margin-bottom: 4px;
}
.case-download-panel p {
  margin: 0;
  color: var(--mack-gray-3);
  font-size: 14px;
}
.case-download-kicker {
  display: inline-flex;
  color: var(--mack-red-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.activity-live-timer.is-expired strong { color: var(--red-err); }
.report-page { max-width: 1040px; }
.report-hero-card { margin-bottom: 22px; }
.report-document {
  margin-top: 24px;
  background: white;
  border: 1px solid rgba(17,18,23,.08);
  border-radius: 30px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.report-cover {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 34px;
  color: white;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.25), transparent 22rem),
    linear-gradient(135deg, var(--mack-red-deep), var(--mack-red));
}
.report-kicker {
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .84;
  margin-bottom: 8px;
}
.report-cover h1 {
  font-size: clamp(28px, 5vw, 50px);
  line-height: .95;
  letter-spacing: -.055em;
  margin: 0 0 8px;
}
.report-cover p { opacity: .88; margin: 0; }
.report-score-badge {
  min-width: 180px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(10px);
  text-align: center;
}
.report-score-badge span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 850;
  letter-spacing: .08em;
  opacity: .8;
  margin-bottom: 4px;
}
.report-score-badge strong {
  display: block;
  font-size: 36px;
  letter-spacing: -.04em;
}
.report-disclaimer {
  margin: 26px 34px 0;
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--blue-soft);
  color: #1e3a8a;
  font-size: 14px;
  border: 1px solid rgba(37,99,235,.14);
}
.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 26px 34px 8px;
}
.report-summary-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(17,18,23,.08);
  background: linear-gradient(180deg, #fff, #fafafa);
}
.report-summary-card span {
  display: block;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--mack-gray-3);
  margin-bottom: 6px;
}
.report-summary-card strong {
  display: block;
  color: var(--mack-black);
  font-size: 17px;
  overflow-wrap: anywhere;
}
.report-section { padding: 24px 34px 32px; }
.report-section + .report-section { border-top: 1px solid rgba(17,18,23,.08); }
.report-section h2 {
  font-size: 24px;
  letter-spacing: -.035em;
  margin-bottom: 16px;
}
.report-activity-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(17,18,23,.08);
  background: #fff;
  margin-bottom: 12px;
  box-shadow: 0 10px 24px rgba(17,18,23,.05);
}
.report-activity-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.report-activity-top span {
  display: block;
  color: var(--mack-red-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.report-activity-top h3 {
  font-size: 17px;
  margin-top: 3px;
  letter-spacing: -.02em;
}
.report-activity-top strong {
  flex: 0 0 auto;
  color: var(--mack-red-dark);
  background: var(--mack-red-soft);
  border: 1px solid rgba(215,25,32,.13);
  border-radius: 999px;
  padding: 8px 12px;
}
.report-activity-card p { color: var(--mack-gray-3); margin: 0 0 6px; }
.report-activity-card small { color: var(--mack-gray-4); font-weight: 700; }
.feedback-block { margin-bottom: 28px; }
.feedback-block h3 {
  font-size: 19px;
  letter-spacing: -.025em;
  margin-bottom: 12px;
}
.feedback-row {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(17,18,23,.08);
  margin-bottom: 10px;
  background: #fff;
}
.feedback-row.ok {
  border-color: rgba(22,163,74,.18);
  background: linear-gradient(135deg, rgba(240,253,244,.9), #fff);
}
.feedback-row.wrong {
  border-color: rgba(220,38,38,.18);
  background: linear-gradient(135deg, rgba(254,242,242,.92), #fff);
}
.feedback-row div { margin-bottom: 8px; }
.feedback-row strong { display: block; color: var(--mack-black); }
.feedback-row span {
  display: block;
  color: var(--mack-gray-3);
  font-size: 13px;
  margin-top: 3px;
}
.feedback-row p { margin: 6px 0 0; color: var(--mack-ink); }
.reflection-note {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--mack-gray);
  border: 1px solid rgba(17,18,23,.06);
  color: var(--mack-ink);
  margin-top: 12px;
}
@media (max-width: 780px) {
  .case-download-panel { flex-direction: column; align-items: stretch; }
  .report-cover { flex-direction: column; align-items: stretch; }
  .report-grid { grid-template-columns: 1fr; }
  .report-score-badge { min-width: 0; }
}
@page {
  size: A4;
  margin: 12mm;
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  html, body {
    background:
      radial-gradient(circle at top left, rgba(215, 25, 32, 0.11), transparent 32rem),
      radial-gradient(circle at top right, rgba(17, 18, 23, 0.09), transparent 26rem),
      linear-gradient(180deg, #FFFFFF 0%, #F6F7FB 38%, #F1F3F7 100%) !important;
    color: #111217 !important;
  }
  body::before,
  .no-print,
  .header,
  .footer,
  .protocol-card {
    display: none !important;
  }
  .container,
  .report-page {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .report-document {
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  .report-cover {
    background: #991b1b !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 28px !important;
  }
  .report-disclaimer,
  .report-grid,
  .report-section {
    padding-left: 28px !important;
    padding-right: 28px !important;
  }
  .report-summary-card,
  .report-activity-card,
  .feedback-row,
  .reflection-note {
    break-inside: avoid;
    box-shadow: none !important;
  }
  .report-section { break-inside: auto; }
  a { color: inherit; text-decoration: none; }
}
.table-wrap { width: 100%; overflow-x: auto; }
.score-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 12px;
  border: 1px solid rgba(17,18,23,.08);
  border-radius: 18px;
  overflow: hidden;
}
.score-table th,
.score-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(17,18,23,.07);
  font-size: 14px;
}
.score-table th {
  background: var(--mack-red-soft);
  color: var(--mack-red-dark);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.score-table tr:last-child td { border-bottom: none; }
.score-table td:nth-child(2), .score-table th:nth-child(2) { text-align: center; font-weight: 800; }

/* Lesson selector cards */
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.lesson-mini-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}
.lesson-mini-card strong {
  display: block;
  color: var(--mack-red-dark);
  margin-bottom: 6px;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.lesson-mini-card span {
  color: #5b6472;
  font-size: 0.9rem;
  line-height: 1.45;
}
.lesson-mini-card.locked {
  opacity: .58;
  background: #f7f7f8;
}
@media (max-width: 760px) {
  .lesson-grid { grid-template-columns: 1fr; }
}


/* -------------------------------------------------------------------------- */
/* AULA 3 — COMPONENTES ESPECÍFICOS                                           */
/* -------------------------------------------------------------------------- */
.method-note {
  margin: 16px 0 22px;
  padding: 18px 20px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 241, 242, .96), rgba(255,255,255,.96)),
    radial-gradient(circle at top right, rgba(215, 25, 32, .10), transparent 16rem);
  border: 1px solid rgba(215, 25, 32, .14);
  box-shadow: 0 12px 32px rgba(17,18,23,.05);
}
.method-note strong {
  display: block;
  color: var(--mack-red-dark);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.method-note p,
.method-note li {
  color: var(--mack-ink);
  line-height: 1.65;
  font-size: 14px;
}
.method-note ol { margin: 10px 0 0 18px; padding: 0; }

.espelho-options .quiz-option {
  min-width: 260px;
  text-align: left;
  line-height: 1.45;
}
.espelho-options .quiz-option strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-right: 8px;
  border-radius: 999px;
  background: rgba(17,18,23,.07);
}
.espelho-options .quiz-option.selected strong { background: rgba(255,255,255,.22); color: #fff; }

.radar-dimension .quiz-question-text strong {
  font-size: 15px;
}
.radar-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.radar-option {
  text-align: left;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  line-height: 1.35;
}
.radar-option strong {
  font-size: 13px;
}
.radar-option span {
  font-weight: 600;
  font-size: 12px;
  color: var(--mack-gray-3);
}
.radar-option.selected span { color: rgba(255,255,255,.88); }
.radar-result-box {
  margin-top: 18px;
}

.sbi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.sbi-card {
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(17,18,23,.08);
  box-shadow: 0 12px 30px rgba(17,18,23,.05);
}
.sbi-card strong {
  display: block;
  color: var(--mack-red-dark);
  font-size: 16px;
  margin-bottom: 8px;
}
.sbi-card span {
  color: var(--mack-gray-3);
  line-height: 1.55;
  font-size: 14px;
}
.confirmation-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 18px 0;
  padding: 18px;
  border-radius: 18px;
  background: rgba(245,246,248,.86);
  border: 1px solid var(--mack-gray-2);
  cursor: pointer;
}
.confirmation-box input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--mack-red);
}
.confirmation-box span {
  font-weight: 750;
  line-height: 1.5;
  color: var(--mack-black);
}

@media (max-width: 860px) {
  .radar-options,
  .sbi-grid {
    grid-template-columns: 1fr;
  }
  .espelho-options .quiz-option {
    min-width: 100%;
  }
}

/* -------------------------------------------------------------------------- */
/* AJUSTES GERAIS — PROFESSORA, MOBILE E STATUS DE ENVIO                      */
/* -------------------------------------------------------------------------- */
.professor-page { max-width: 1180px; }
.professor-auth-card { max-width: 620px; margin: 0 auto; }
.professor-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 22px;
  align-items: center;
}
.professor-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.professor-hero-grid div {
  border-radius: 18px;
  background: rgba(245,246,248,.9);
  border: 1px solid var(--mack-gray-2);
  padding: 16px 14px;
  text-align: center;
}
.professor-hero-grid strong {
  display: block;
  font-size: 30px;
  line-height: 1;
  color: var(--mack-red-dark);
  letter-spacing: -.05em;
}
.professor-hero-grid span {
  display: block;
  margin-top: 6px;
  color: var(--mack-gray-3);
  font-weight: 750;
  font-size: 12px;
}
.professor-alert-card {
  background: linear-gradient(135deg, rgba(255,251,235,.98), rgba(255,255,255,.96));
  border-color: #FED7AA;
}
.professor-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.compact-list { gap: 8px; }
.compact-list li { font-size: 13px; }

.btn.btn-success {
  background: linear-gradient(135deg, #16A34A, #15803D);
  box-shadow: 0 14px 34px rgba(22, 163, 74, .22);
}
.btn.btn-pending {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  box-shadow: 0 14px 34px rgba(245, 158, 11, .22);
}
.btn.btn-loading,
.btn:disabled {
  opacity: .78;
  cursor: wait;
  transform: none !important;
}
.submission-banner {
  margin: 14px 0 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--mack-gray-2);
  background: rgba(255,255,255,.86);
  box-shadow: 0 10px 24px rgba(17,18,23,.06);
  font-weight: 800;
  line-height: 1.45;
}
.submission-banner.info { border-color: rgba(37,99,235,.18); background: #EFF6FF; color: #1E3A8A; }
.submission-banner.success { border-color: #BBF7D0; background: #F0FDF4; color: #166534; }
.submission-banner.warn { border-color: #FED7AA; background: #FFFBEB; color: #92400E; }
.submission-banner.error { border-color: #FECACA; background: #FEF2F2; color: #991B1B; }

/* Mobile-first corrections for all activity screens */
html, body { max-width: 100%; overflow-x: hidden; }
.card, .activity-step-card, .flow-stage, .flow-layout, .quiz-question, .classify-item { min-width: 0; }
textarea, input, select, button { max-width: 100%; }

@media (max-width: 900px) {
  .professor-hero,
  .professor-grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .brand-mark { align-items: flex-start; }
  .brand-mark h1 { font-size: 16px; line-height: 1.15; }
  .brand-mark .tag { font-size: 11px; }
  .header-inner { gap: 12px; }
  .session-pill { width: 100%; justify-content: center; text-align: center; }

  .aula-shell { padding: 16px 10px 24px; }
  .aula-hero { padding: 18px; }
  .aula-title { font-size: 34px; letter-spacing: -.055em; }
  .aula-copy { font-size: 14px; }

  .flow-layout { gap: 12px; }
  .flow-panel { border-radius: 18px; }
  .flow-panel-header { padding: 16px; }
  .progress-list { gap: 8px; padding: 12px; }
  .progress-item { min-width: 198px; padding: 9px; grid-template-columns: 32px 1fr; }
  .progress-item .step-state { display: none; }
  .progress-item .step-text strong { font-size: 12px; }
  .progress-item .step-text span { font-size: 10px; }

  .stage-toolbar { padding: 14px; border-radius: 18px; }
  .stage-actions .btn { width: 100%; }

  .activity-step-card { min-height: auto; padding: 22px 16px; border-radius: 22px; }
  .activity-header { gap: 12px; }
  .activity-header h2 { font-size: 32px; line-height: 1; letter-spacing: -.055em; word-break: normal; overflow-wrap: anywhere; }
  .activity-index-chip { width: 46px; height: 46px; border-radius: 16px; font-size: 22px; }
  .activity-meta { align-items: stretch; flex-direction: column; }
  .activity-live-timer { justify-content: center; width: 100%; white-space: normal; }
  .divider { margin: 18px 0; }

  .quiz-question, .classify-item { padding: 14px; border-radius: 16px; }
  .quiz-question-text, .classify-item-text { font-size: 14px; line-height: 1.45; }
  .quiz-options, .classify-buttons, .classify-buttons-three, .espelho-options { display: grid !important; grid-template-columns: 1fr !important; gap: 8px; width: 100%; }
  .quiz-option, .classify-btn, .classify-buttons-three .classify-btn, .espelho-options .quiz-option {
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
    padding: 12px 12px;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
  }
  .espelho-options .quiz-option { text-align: left; }
  .radar-options { grid-template-columns: 1fr !important; }
  .radar-option { width: 100%; }
  .sbi-grid { grid-template-columns: 1fr !important; }
  .confirmation-box { padding: 14px; }
  .complete-panel-content { gap: 10px; }
  .activity-complete-panel { padding: 14px; }

  .field-row { grid-template-columns: 1fr !important; }
  .field textarea { min-height: 120px; }
  .method-note { padding: 14px; border-radius: 18px; }

  .professor-hero-grid { grid-template-columns: 1fr; }
  .professor-page .card { padding: 18px; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .score-table { min-width: 640px; }
}

@media (max-width: 420px) {
  .activity-header h2 { font-size: 28px; }
  .aula-title { font-size: 30px; }
  .hero-title { font-size: 44px; }
  .btn { padding-left: 14px; padding-right: 14px; }
  .activity-step-card { padding-left: 14px; padding-right: 14px; }
}


/* -------------------------------------------------------------------------- */
/* MOBILE HARDENING — correção completa para celulares e webviews             */
/* -------------------------------------------------------------------------- */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
}

img,
svg,
video,
canvas,
iframe,
table {
  max-width: 100%;
}

.flow-layout,
.flow-stage,
#activities-host,
.activity-step-card,
.activity-header,
.activity-header-main,
.activity-meta,
.field,
.field-row,
.quiz-question,
.classify-item,
.report-document,
.protocol-card,
.professor-page,
.card {
  min-width: 0 !important;
  max-width: 100% !important;
}

label,
p,
small,
span,
strong,
h1,
h2,
h3,
.subtitle,
.quiz-question-text,
.classify-item-text,
.step-text,
.protocol-code,
.report-activity-card,
.feedback-row {
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

button,
.btn,
.quiz-option,
.classify-btn {
  touch-action: manipulation;
}

@media (max-width: 760px) {
  body::before { background-size: 32px 32px; }

  .header {
    position: sticky;
    padding: 10px 10px;
  }
  .header-inner {
    width: 100%;
    max-width: 100%;
    flex-direction: column;
    align-items: stretch !important;
    gap: 10px;
  }
  .brand-mark {
    width: 100%;
    min-width: 0;
  }
  .brand-mark > div:last-child {
    min-width: 0;
  }
  .header h1 {
    font-size: 15px !important;
    line-height: 1.15 !important;
    max-width: 100%;
    white-space: normal;
  }
  .header .tag {
    font-size: 9.5px !important;
    letter-spacing: .05em;
    white-space: normal;
  }
  .logo-dot {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px;
    border-radius: 11px !important;
    font-size: 11px;
  }
  .session-bar {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }
  .session-bar .student-name,
  .session-bar .timer,
  .session-pill {
    max-width: 100%;
    min-width: 0;
    text-align: center;
    padding: 7px 9px;
    font-size: 12px;
  }

  .container,
  .container-wide,
  .container-full,
  .aula-shell,
  .landing-hero,
  .next-lessons-card {
    width: 100%;
    max-width: 100%;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .landing-hero {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px;
    padding-top: 18px !important;
  }
  .hero-panel,
  .login-panel,
  .aula-hero,
  .flow-panel,
  .stage-toolbar,
  .activity-step-card,
  .protocol-card,
  .card {
    border-radius: 18px !important;
  }
  .hero-panel { padding: 22px 16px !important; }
  .hero-title { font-size: 40px !important; line-height: .95 !important; letter-spacing: -.055em; }
  .hero-copy { font-size: 15px !important; }
  .hero-grid { grid-template-columns: 1fr !important; }

  .aula-hero { padding: 16px !important; margin-bottom: 12px; }
  .aula-hero-grid { grid-template-columns: minmax(0,1fr) !important; gap: 14px; }
  .aula-title { font-size: 28px !important; line-height: 1.02 !important; letter-spacing: -.045em; }
  .aula-copy { font-size: 13px !important; }
  .aula-stats { grid-template-columns: 1fr !important; min-width: 0 !important; }
  .stat-pill { padding: 12px; }

  .flow-layout {
    display: block !important;
    width: 100%;
  }
  .flow-sidebar {
    position: relative !important;
    top: auto !important;
    width: 100%;
    margin-bottom: 12px;
  }
  .flow-panel {
    overflow: visible !important;
    width: 100%;
  }
  .flow-panel-header {
    padding: 14px !important;
  }
  .progress-list {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    overflow: visible !important;
    padding: 10px !important;
    gap: 8px !important;
  }
  .progress-item {
    min-width: 0 !important;
    width: 100% !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    padding: 10px !important;
    transform: none !important;
  }
  .progress-item .step-state {
    display: none !important;
  }
  .progress-item .step-text strong { font-size: 13px !important; }
  .progress-item .step-text span { font-size: 11px !important; }

  .stage-toolbar {
    width: 100%;
    padding: 14px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px;
  }
  .stage-toolbar-title strong { font-size: 14px; }
  .stage-actions { width: 100%; }
  .stage-actions .btn { width: 100%; }

  .activity-step-card {
    width: 100% !important;
    padding: 22px 14px !important;
    min-height: auto !important;
    overflow: hidden !important;
  }
  .activity-step-card::before { height: 7px; }
  .activity-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: start !important;
    gap: 10px !important;
    margin-bottom: 8px;
  }
  .activity-header-main { order: 1; }
  .activity-index-chip {
    order: 2;
    width: 44px !important;
    height: 44px !important;
    border-radius: 15px !important;
    font-size: 20px !important;
  }
  .activity-header h2 {
    font-size: 27px !important;
    line-height: 1.04 !important;
    letter-spacing: -.045em !important;
    margin-top: 10px !important;
  }
  .activity-meta {
    width: 100%;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .activity-live-timer {
    width: 100%;
    justify-content: space-between !important;
    gap: 8px;
    padding: 9px 11px !important;
  }
  .activity-live-timer strong {
    min-width: auto !important;
    font-size: 16px !important;
  }
  .live-timer-label { font-size: 10px !important; }
  .mini-status {
    display: block;
    width: 100%;
    font-size: 12px;
    padding: 4px 0;
  }
  .divider { margin: 16px 0 !important; }

  .card .subtitle,
  .activity-step-card .subtitle {
    font-size: 13px !important;
    line-height: 1.5;
  }
  .field { width: 100%; }
  .field-row,
  .classify-grid,
  .report-grid,
  .lesson-grid,
  .professor-grid-3,
  .professor-hero,
  .professor-hero-grid,
  .sbi-grid,
  .radar-options {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  label {
    font-size: 13px !important;
    line-height: 1.35 !important;
  }
  input,
  textarea,
  select {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 16px !important;
    padding: 12px !important;
    border-radius: 14px !important;
  }
  textarea { min-height: 118px; }

  .quiz-question,
  .classify-item,
  .sbi-card,
  .confirmation-box,
  .method-note,
  .radar-result-box,
  .case-download-panel {
    width: 100% !important;
    padding: 14px !important;
    border-radius: 16px !important;
  }
  .quiz-options,
  .classify-buttons,
  .classify-buttons-three,
  .espelho-options {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .quiz-option,
  .classify-btn,
  .classify-buttons-three .classify-btn,
  .espelho-options .quiz-option,
  .radar-option {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    display: block !important;
    padding: 12px !important;
    border-radius: 14px !important;
    white-space: normal !important;
    line-height: 1.35 !important;
    text-align: center;
  }
  .espelho-options .quiz-option,
  .radar-option { text-align: left !important; }
  .quiz-question-text,
  .classify-item-text {
    font-size: 13.5px !important;
    line-height: 1.45 !important;
  }

  .btn-row,
  .activity-nav,
  .complete-panel-content {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    gap: 10px;
  }
  .btn-row .btn,
  .activity-nav .btn,
  .complete-panel-content .btn,
  .btn {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    text-align: center;
  }
  .activity-complete-panel { padding: 12px !important; }
  .complete-icon { margin: 0 auto; }

  .protocol-data dl {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .protocol-code {
    max-width: 100%;
    white-space: normal;
    word-break: break-all;
  }
  .report-cover {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px;
  }
  .report-score-badge { width: 100%; }
  .table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .score-table { min-width: 620px; }
}

@media (max-width: 420px) {
  .container,
  .container-wide,
  .container-full,
  .aula-shell,
  .landing-hero,
  .next-lessons-card {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  .activity-step-card { padding-left: 12px !important; padding-right: 12px !important; }
  .activity-header h2 { font-size: 25px !important; }
  .page-title, .protocol-title { font-size: 30px !important; }
  .hero-title { font-size: 36px !important; }
  .activity-index-chip { width: 40px !important; height: 40px !important; font-size: 18px !important; }
}


/* =========================================================
   AJUSTES FINAIS MOBILE + ESTADOS DE NAVEGAÇÃO
   ========================================================= */
.radar-option strong,
.radar-option span {
  display: block;
  width: 100%;
}
.radar-option strong {
  margin-bottom: 4px;
  line-height: 1.15;
}
.radar-option span {
  line-height: 1.38;
  white-space: normal;
  overflow-wrap: anywhere;
}
.confirmation-box {
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}
.confirmation-box span {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
.btn.btn-loading::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.55);
  border-top-color: #fff;
  animation: btnSpin .8s linear infinite;
  vertical-align: -1px;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  .radar-option {
    display: block !important;
    text-align: left !important;
    min-height: auto !important;
  }
  .radar-option strong {
    font-size: 15px !important;
    margin-bottom: 6px !important;
    color: inherit;
  }
  .radar-option span {
    font-size: 13.5px !important;
    font-weight: 650 !important;
  }
  .confirmation-box {
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .confirmation-box input {
    width: 22px !important;
    height: 22px !important;
    margin: 2px 0 0 !important;
  }
  .confirmation-box span {
    font-size: 14px !important;
    line-height: 1.45 !important;
  }
}


/* Validação visual de campos obrigatórios */
.field-missing {
  border-color: rgba(185, 28, 28, 0.75) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
  border-radius: 18px;
}
.field.field-missing,
.confirmation-box.field-missing,
.radar-item.field-missing,
.quiz-question.field-missing {
  background: rgba(254, 242, 242, 0.9) !important;
}
.field-missing input,
.field-missing textarea,
.field-missing select {
  border-color: rgba(185, 28, 28, 0.85) !important;
}
.field-missing::after {
  content: "Campo obrigatório";
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #b91c1c;
}
