/* AMSI Calibration Trainer: technique walkthroughs. Classes are prefixed acq- so the theme is untouched.
   Uses the trainer's --ac-* colour tokens when present, with AMSI fallbacks. */

.acq-card, .acq-remind, .acq-lib {
  --acq-ink: var(--ac-ink, #1B211D); --acq-ink-2: var(--ac-ink-2, #5A655E); --acq-ink-3: var(--ac-ink-3, #7A857E);
  --acq-line: var(--ac-line, #E1E7E1); --acq-line-2: var(--ac-line-2, #CBD5CC);
  --acq-panel: var(--ac-panel, #FFFFFF); --acq-panel-2: var(--ac-panel-2, #F3F6F3);
  --acq-brand: var(--ac-brand, #316F41); --acq-brand-deep: var(--ac-brand-deep, #265934); --acq-tint: var(--ac-brand-tint, #E8F0EA);
  --acq-teal: var(--ac-teal, #038590); --acq-over: var(--ac-over, #C2410C); --acq-under: var(--ac-under, #1B7B9F);
  --acq-font: var(--ac-font, Bahnschrift, "Segoe UI", system-ui, -apple-system, Arial, sans-serif);
  font-family: var(--acq-font); color: var(--acq-ink); box-sizing: border-box;
}
.acq-card *, .acq-remind *, .acq-lib * { box-sizing: border-box; }

/* ---------------- Card ---------------- */
.acq-card { background: var(--acq-panel); border: 1px solid var(--acq-line); border-radius: 2px; padding: 20px 22px; margin: 0 0 16px; }
.acq-card-k { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--acq-teal); }
.acq-card .acq-card-h { font-size: 21px; line-height: 1.2; margin: 4px 0 8px; font-weight: 600; color: var(--acq-ink); font-family: var(--acq-font); }
.acq-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.acq-chip { font-size: 11.5px; padding: 2px 9px; border: 1px solid var(--acq-line-2); border-radius: 20px; color: var(--acq-ink-2); }
.acq-chip-o { border-color: transparent; background: var(--acq-tint); color: var(--acq-brand-deep); }
.acq-card .acq-why { background: var(--acq-panel-2); border-left: 3px solid var(--acq-teal); padding: 8px 12px; font-size: 14px; margin: 0 0 10px; }
.acq-card .acq-one { font-size: 15.5px; margin: 0 0 14px; color: var(--acq-ink); }
.acq-h4 { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--acq-ink-3); margin: 0 0 8px; }
.acq-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-top: 16px; }
.acq-steps { margin: 0; padding-left: 20px; font-size: 14.5px; }
.acq-steps li { margin: 0 0 6px; }
.acq-before { background: var(--acq-tint); padding: 12px 14px; border-radius: 2px; }
.acq-before ul { margin: 0; padding-left: 18px; font-size: 14px; }
.acq-before li { margin: 0 0 6px; }
.acq-card .acq-ev { font-size: 12.5px; color: var(--acq-ink-2); margin: 14px 0 0; }
.acq-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.acq-btn, .acq-btn:visited, .acq-btn:focus, .acq-btn:hover {
  display: inline-flex; align-items: center; justify-content: center; background: var(--acq-brand); color: #fff; border: 1px solid var(--acq-brand);
  border-radius: 2px; padding: 9px 18px; font: 600 14px/1.3 var(--acq-font); cursor: pointer; text-decoration: none; box-shadow: none;
}
.acq-btn:hover { background: var(--acq-brand-deep); border-color: var(--acq-brand-deep); color: #fff; }
.acq-btn.acq-btn-ghost, .acq-btn.acq-btn-ghost:focus { background: transparent; color: var(--acq-ink); border-color: var(--acq-line-2); }
.acq-btn.acq-btn-ghost:hover { background: var(--acq-panel-2); color: var(--acq-ink); border-color: var(--acq-brand); }
.acq-btn:focus-visible, .acq-cbtn:focus-visible, .acq-dot:focus-visible, .acq-tile:focus-visible { outline: 2px solid var(--acq-teal); outline-offset: 2px; }

/* ---------------- Player ---------------- */
.acq-player { position: relative; }
.acq-stage {
  position: relative; height: 340px; overflow: hidden; border-radius: 2px;
  background: linear-gradient(180deg, #FBFCFB 0%, #F3F6F3 100%); border: 1px solid var(--acq-line);
}
.acq-el { position: absolute; transition: left .8s cubic-bezier(.3,.7,.2,1), width .8s cubic-bezier(.3,.7,.2,1), top .6s ease, opacity .4s ease, transform .4s ease; }
.acq-el.is-enter { opacity: 0; transform: translateY(6px); transition: none; }
.acq-el.is-out { opacity: 0; transform: translateY(-4px); }

.acq-q { top: 12px; left: 14px; right: 14px; background: var(--acq-panel); border-left: 4px solid var(--acq-brand); padding: 9px 12px; font-size: 15px; font-weight: 600; box-shadow: 0 1px 2px rgba(27,33,29,.06); }

.acq-axis { left: 0; right: 0; top: 84%; height: 30px; }
.acq-axis-line { position: absolute; left: 4%; right: 4%; top: 0; height: 2px; background: var(--acq-line-2); }
.acq-tick { position: absolute; top: 0; transform: translateX(-50%); font-size: 11.5px; color: var(--acq-ink-3); padding-top: 9px; white-space: nowrap; }
.acq-tick i { position: absolute; left: 50%; top: -3px; width: 1px; height: 8px; background: var(--acq-line-2); }

.acq-range { top: 73%; height: 22px; border-radius: 3px; background: var(--acq-brand); color: #fff; min-width: 3px; }
.acq-range[data-row="1"] { top: 63%; }
.acq-range[data-row="2"] { top: 40%; }
.acq-range.is-narrow .acq-range-l { left: 50%; transform: translateX(-50%); }
.acq-range-l { position: absolute; left: 0; bottom: 100%; margin-bottom: 3px; font-size: 11.5px; font-weight: 600; white-space: nowrap; color: var(--acq-ink-2); }
.acq-range-v { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.acq-range[data-tone="teal"] { background: var(--acq-teal); }
.acq-range[data-tone="over"] { background: var(--acq-over); }
.acq-range[data-tone="under"] { background: var(--acq-under); }

.acq-pt { top: 66%; height: 18%; width: 0; }
.acq-pt i { position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: var(--acq-brand); }
.acq-pt i::after { content: ""; position: absolute; left: -4px; bottom: -5px; width: 10px; height: 10px; border-radius: 50%; background: inherit; border: 2px solid #fff; }
.acq-pt span { position: absolute; bottom: 100%; left: 0; transform: translateX(-50%); margin-bottom: 3px; font-size: 11.5px; font-weight: 700; white-space: nowrap; color: var(--acq-brand); background: rgba(255,255,255,.85); padding: 0 4px; border-radius: 3px; }
.acq-pt.no-label span { display: none; }
.acq-pt[data-lv="1"] { top: 56%; height: 28%; }
.acq-pt[data-tone="teal"] i { background: var(--acq-teal); } .acq-pt[data-tone="teal"] span { color: var(--acq-teal); }
.acq-pt[data-tone="over"] i { background: var(--acq-over); } .acq-pt[data-tone="over"] span { color: var(--acq-over); }
.acq-pt[data-tone="ink"] i { background: var(--acq-ink); } .acq-pt[data-tone="ink"] span { color: var(--acq-ink); }

.acq-bins { left: 0; right: 0; top: 46%; height: 38%; }
.acq-bin { position: absolute; bottom: 0; height: 100%; padding: 0 3px; }
.acq-bin i { position: absolute; left: 3px; right: 3px; bottom: 0; background: rgba(3,133,144,.28); border-top: 2px solid var(--acq-teal); transition: height .8s cubic-bezier(.3,.7,.2,1); }
.acq-bin span { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font-size: 12px; font-weight: 700; color: var(--acq-teal); }
.acq-bin span.is-empty { color: var(--acq-ink-3); font-weight: 400; }

.acq-bet { left: 5%; right: 5%; top: 24%; height: 36%; display: flex; align-items: stretch; gap: 10px; }
.acq-bet-c { flex: 1 1 0; background: var(--acq-panel); border: 2px solid var(--acq-line); border-radius: 6px; padding: 8px 10px; font-size: 13.5px; position: relative; transition: border-color .3s, box-shadow .3s, opacity .3s; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.acq-bet-c b { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--acq-ink-3); }
.acq-bet-b { padding-left: 60px; }
.acq-wheel { position: absolute; left: 10px; top: 50%; margin-top: -20px; width: 40px; height: 40px; border-radius: 50%;
  background: conic-gradient(var(--acq-teal) calc(var(--p, 90) * 1%), #DDE3DD 0); animation: acqSpin 6s linear infinite; }
.acq-wheel::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: #fff; }
.acq-bet-or { align-self: center; font-size: 12px; color: var(--acq-ink-3); }
.acq-bet-tie { position: absolute; left: 50%; top: -13px; transform: translateX(-50%); font-size: 12px; font-weight: 700; color: var(--acq-teal); background: #fff; padding: 2px 10px; border-radius: 12px; border: 1px solid var(--acq-teal); opacity: 0; transition: opacity .3s; white-space: nowrap; }
.acq-bet[data-pick="a"] .acq-bet-a, .acq-bet[data-pick="b"] .acq-bet-b { border-color: var(--acq-teal); box-shadow: 0 0 0 3px rgba(3,133,144,.15); }
.acq-bet[data-pick="a"] .acq-bet-b, .acq-bet[data-pick="b"] .acq-bet-a { opacity: .55; }
.acq-bet[data-pick="tie"] .acq-bet-c { border-color: var(--acq-teal); }
.acq-bet[data-pick="tie"] .acq-bet-tie { opacity: 1; }

.acq-conf { left: 10%; right: 10%; top: 26%; }
.acq-conf-track { position: relative; height: 10px; background: #DDE3DD; border-radius: 5px; margin: 22px 0 24px; }
.acq-conf-track span { position: absolute; top: 16px; transform: translateX(-50%); font-size: 11.5px; color: var(--acq-ink-3); }
.acq-conf-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--acq-brand); border-radius: 5px; transition: width .8s cubic-bezier(.3,.7,.2,1); }
.acq-conf-knob { position: absolute; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: #fff; border: 3px solid var(--acq-brand); transition: left .8s cubic-bezier(.3,.7,.2,1); }
.acq-conf-l { text-align: center; font-weight: 700; font-size: 15px; color: var(--acq-brand); }

.acq-list { left: 6%; right: 6%; top: 24%; background: var(--acq-panel); border: 1px solid var(--acq-line); border-radius: 4px; padding: 10px 14px; font-size: 13.5px; }
.has-axis .acq-list { max-height: 36%; overflow: hidden; }
.acq-stage:not(.has-axis) .acq-list { top: 56%; }
.acq-list b { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--acq-ink-3); margin-bottom: 4px; }
.acq-list ul { margin: 0; padding-left: 18px; }
.acq-list li { margin: 0 0 3px; animation: acqIn .5s ease both; }

.acq-calc { left: 8%; right: 8%; top: 26%; background: var(--acq-panel); border: 1px solid var(--acq-line); border-left: 4px solid var(--acq-teal); border-radius: 4px; padding: 10px 14px; font-size: 14px; font-variant-numeric: tabular-nums; }
.has-axis .acq-calc { top: 24%; }
.acq-calc div { padding: 2px 0; }
.acq-calc div:last-child { font-weight: 700; }
.acq-calc .is-new { animation: acqIn .5s ease both; }

.acq-note { left: 50%; transform: translateX(-50%); max-width: 82%; width: max-content; text-align: center; background: var(--acq-brand); color: #fff; font-size: 13.5px; font-weight: 600; padding: 7px 14px; border-radius: 18px; }
.acq-note.is-enter { transform: translate(-50%, 6px); }
.acq-note.is-out { transform: translate(-50%, -4px); }
.acq-note[data-tone="over"] { background: var(--acq-over); }
.acq-note[data-tone="under"] { background: var(--acq-under); }
.acq-note[data-tone="teal"] { background: var(--acq-teal); }

.acq-prog { height: 3px; background: var(--acq-line); }
.acq-prog i { display: block; height: 100%; width: 0; background: var(--acq-brand); }
.acq-card .acq-cap { min-height: 4.4em; margin: 10px 0 8px; font-size: 15.5px; line-height: 1.45; color: var(--acq-ink); }
.acq-ctrl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acq-cbtn, .acq-cbtn:hover, .acq-cbtn:focus {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; min-width: 34px; padding: 0 10px; justify-content: center;
  background: var(--acq-panel); color: var(--acq-ink); border: 1px solid var(--acq-line-2); border-radius: 17px; font: 600 13px/1 var(--acq-font); cursor: pointer; box-shadow: none;
}
.acq-cbtn:hover { border-color: var(--acq-brand); }
.acq-cbtn[disabled] { opacity: .4; cursor: default; }
.acq-play, .acq-play:hover, .acq-play:focus { background: var(--acq-brand); color: #fff; border-color: var(--acq-brand); padding: 0 14px 0 12px; }
.acq-play:hover { background: var(--acq-brand-deep); }
.acq-ico { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #fff; }
.acq-play.is-playing .acq-ico { width: 10px; height: 12px; border-width: 0 3px; border-color: #fff; border-style: solid; }
.acq-dots { display: flex; gap: 5px; margin-left: 4px; flex-wrap: wrap; }
.acq-dot, .acq-dot:hover, .acq-dot:focus { width: 10px; height: 10px; border-radius: 50%; padding: 0; min-width: 0; border: 0; background: var(--acq-line-2); cursor: pointer; box-shadow: none; }
.acq-dot.is-done { background: #9DB8A3; }
.acq-dot.is-on { background: var(--acq-brand); transform: scale(1.25); }
.acq-time { margin-left: auto; font-size: 12px; color: var(--acq-ink-3); }

@keyframes acqIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes acqSpin { to { transform: rotate(360deg); } }

/* Speaker icon for the narration toggle */
.acq-spk { position: relative; width: 14px; height: 12px; display: inline-block; }
.acq-spk::before { content: ""; position: absolute; left: 0; top: 3px; width: 5px; height: 6px; background: currentColor; }
.acq-spk::after { content: ""; position: absolute; left: 3px; top: 0; border-style: solid; border-width: 6px 6px 6px 0; border-color: transparent currentColor transparent transparent; }
.acq-sound .acq-spk { margin-right: 2px; }
.acq-sound.is-off { color: var(--acq-ink-3); }
.acq-sound.is-off .acq-spk { opacity: .55; }
.acq-sound.is-off .acq-spk + .acq-sound-t { text-decoration: line-through; text-decoration-thickness: 1px; }

/* ---------------- Reminder strip (shown during the next round) ---------------- */
.acq-remind { background: #EEF6F7; border-left: 4px solid var(--acq-teal); padding: 10px 14px; margin: 0 0 14px; font-size: 14px; }
.acq-remind-k { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--acq-teal); }
.acq-remind-n { font-weight: 700; margin: 2px 0 4px; }
.acq-remind ul { margin: 0; padding-left: 18px; }
.acq-remind-a { font-size: 13px; color: var(--acq-teal); }

/* ---------------- Library ---------------- */
.acq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 16px; }
.acq-tile, .acq-tile:hover, .acq-tile:focus {
  text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: var(--acq-panel); color: var(--acq-ink);
  border: 1px solid var(--acq-line); border-radius: 2px; cursor: pointer; font: 400 13.5px/1.4 var(--acq-font); position: relative; box-shadow: none;
}
.acq-tile:hover { border-color: var(--acq-brand); }
.acq-tile.is-open { border-color: var(--acq-brand); box-shadow: inset 3px 0 0 var(--acq-brand); }
.acq-tile b { font-size: 15px; color: var(--acq-ink); }
.acq-tile-tag { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--acq-ink-3); }
.acq-tile-one { color: var(--acq-ink-2); }
.acq-tile-lock, .acq-tile-seen { position: absolute; top: 10px; right: 10px; font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 10px; }
.acq-tile-lock { background: #FFF6DB; color: #7a5a00; }
.acq-tile-seen { background: var(--acq-tint); color: var(--acq-brand-deep); }
.acq-tile.is-locked { opacity: .8; }
.acq-lockbox { background: #FFF6DB; border-left: 4px solid #D9A300; padding: 14px 16px; }
.acq-lockbox p { margin: 6px 0 10px; }

/* ---------------- Small screens ---------------- */
@media (max-width: 640px) {
  .acq-card { padding: 16px 14px; }
  .acq-cols { grid-template-columns: minmax(0, 1fr); }
  .acq-stage { height: 400px; }
  .acq-q { font-size: 14px; }
  .acq-bet { top: 26%; height: 34%; gap: 6px; }
  .acq-bet-c { font-size: 12px; padding: 6px 8px; }
  .acq-bet-b { padding-left: 50px; }
  .acq-wheel { width: 32px; height: 32px; margin-top: -16px; left: 8px; }
  .acq-wheel::after { inset: 9px; }
  .acq-list, .acq-calc { font-size: 12.5px; left: 4%; right: 4%; }
  .acq-tick { font-size: 10.5px; }
  .acq-range-v, .acq-range-l, .acq-pt span { font-size: 10.5px; }
  .acq-time { width: 100%; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .acq-el, .acq-bin i, .acq-conf-fill, .acq-conf-knob { transition: none !important; }
  .acq-list li, .acq-calc .is-new { animation: none !important; }
  .acq-wheel { animation: none; }
}

/* Themes (Hello Elementor, Astra and others) style every <button> with nowrap text, fixed heights
   and centred text. Tiles are buttons, so restore normal wrapping inside the card. */
.acq-lib .acq-grid > .acq-tile {
  white-space: normal !important; height: auto !important; min-height: 0; line-height: 1.4 !important;
  text-align: left !important; overflow: hidden; overflow-wrap: break-word; word-break: normal;
  min-width: 0; max-width: 100%; text-transform: none !important; letter-spacing: normal !important;
}
.acq-lib .acq-grid > .acq-tile > * { white-space: normal !important; overflow-wrap: break-word; max-width: 100%; }
.acq-lib .acq-tile-tag { padding-right: 64px; }
.acq-lib .acq-tile-one { display: block; font-size: 13.5px; line-height: 1.45; }

/* "Before and after" scenes: a missed first range sits on row 2 and the true value's line runs up past it. */
.acq-pt[data-lv="3"] { top: 22%; height: 62%; }
.acq-range-l { background: rgba(255,255,255,.85); padding: 0 4px; border-radius: 3px; }
.acq-range:not(.is-narrow) .acq-range-l { left: -4px; }
.acq-range { z-index: 3; }
