/* AcumenTeach free mock pop-up. Uses the colour tokens from styles.css. */
.fm-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--white, #fff);
  color: var(--ink, #16211B);
  box-shadow: 0 24px 60px rgba(6, 48, 28, .28);
  overflow: auto;
}
.fm-dialog::backdrop { background: rgba(6, 48, 28, .55); }
.fm-dialog[open] { animation: fm-in .22s ease-out; }
@keyframes fm-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fm-dialog[open] { animation: none; } }

.fm-top {
  position: relative;
  padding: 26px 28px 20px;
  background: var(--forest, #06301C);
  color: var(--white, #fff);
}
.fm-kicker {
  margin: 0 0 6px;
  font: 700 .74rem/1.2 var(--sans, sans-serif);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold, #C9A24A);
}
.fm-title {
  margin: 0;
  padding-right: 36px;
  font: 700 1.9rem/1.1 var(--serif, Georgia, serif);
  color: var(--white, #fff);
}
.fm-close {
  position: absolute; top: 14px; right: 14px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: var(--white, #fff);
  cursor: pointer;
}
.fm-close:hover { background: rgba(255, 255, 255, .22); }
.fm-close svg { width: 18px; height: 18px; }

.fm-body { padding: 22px 28px 26px; font-family: var(--sans, sans-serif); }
.fm-list { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 8px; }
.fm-list li { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; line-height: 1.4; }
.fm-list svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; color: var(--green, #0B4A2C); }

.fm-form { display: grid; gap: 12px; }
.fm-field { display: grid; gap: 5px; }
.fm-field label { font-size: .85rem; font-weight: 600; }
.fm-field input,
.fm-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1.5px solid var(--line, #D7E2DA);
  border-radius: var(--radius, 10px);
  background: var(--white, #fff);
  color: var(--ink, #16211B);
  font: 500 1rem var(--sans, sans-serif); /* 16px stops iPhone zoom */
}
.fm-field input:focus,
.fm-field select:focus { outline: 2px solid var(--green, #0B4A2C); outline-offset: 1px; border-color: var(--green, #0B4A2C); }
.fm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 330px) { .fm-row { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .fm-top { padding: 18px 18px 14px; }
  .fm-title { font-size: 1.5rem; }
  .fm-body { padding: 16px 18px 18px; }
  .fm-list { gap: 5px; margin-bottom: 14px; }
  .fm-list li { font-size: .86rem; }
  .fm-form { gap: 10px; }
  .fm-field input, .fm-field select { padding: 10px 12px; }
  .fm-field label { font-size: .8rem; }
}

.fm-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .84rem; line-height: 1.45; color: var(--muted, #55625A); }
.fm-consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--green, #0B4A2C); flex: 0 0 auto; }

.fm-submit { width: 100%; margin-top: 4px; cursor: pointer; font-family: var(--sans, sans-serif); }
.fm-submit[disabled] { opacity: .65; cursor: progress; }
.fm-small { margin: 4px 0 0; font-size: .78rem; line-height: 1.45; color: var(--muted, #55625A); text-align: center; }
.fm-small a { color: inherit; }
.fm-error { margin: 0; padding: 10px 12px; border-radius: 8px; background: #FDECEC; color: #8A1C1C; font-size: .88rem; }
.fm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.fm-done { text-align: center; }
.fm-done .fm-tick { width: 56px; height: 56px; margin: 4px auto 12px; display: grid; place-items: center; border-radius: 999px; background: var(--mist, #EEF4F0); color: var(--green, #0B4A2C); }
.fm-done .fm-tick svg { width: 28px; height: 28px; }
.fm-done h3 { margin: 0 0 8px; font: 700 1.6rem/1.15 var(--serif, Georgia, serif); color: var(--green, #0B4A2C); }
.fm-done p { margin: 0 0 16px; font-size: .95rem; line-height: 1.5; }
.fm-done .btn { width: 100%; box-sizing: border-box; }
.fm-done .fm-next { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line, #D7E2DA); font-size: .9rem; }
.fm-done .fm-next a { color: var(--green, #0B4A2C); font-weight: 700; }

/* Small tab that stays on screen after the pop-up is closed */
.fm-tab {
  position: fixed; left: 16px; bottom: 16px; z-index: 50;
  display: none; align-items: center; gap: 8px;
  padding: 11px 16px;
  border: 0; border-radius: 999px;
  background: var(--gold, #C9A24A); color: var(--forest, #06301C);
  font: 700 .88rem var(--sans, sans-serif);
  box-shadow: 0 8px 24px rgba(6, 48, 28, .25);
  cursor: pointer;
}
.fm-tab.show { display: inline-flex; }
.fm-tab:hover { background: #d8b45e; }
.fm-tab svg { width: 18px; height: 18px; }
@media print { .fm-tab, .fm-dialog { display: none !important; } }
