/* GDV Training demonstration page: a focused, standalone interactive sample course. */
html { scroll-behavior: smooth; }
.dm-page { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: var(--sans); color: var(--ink); }
.dm-page.dm-start { background: radial-gradient(1200px 600px at 50% -10%, var(--navy2) 0%, var(--navy) 62%); color: #fff; }
.dm-page.dm-run { background: var(--bg2); }
.dm-top { display: flex; align-items: center; padding: 14px 20px; }
.dm-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.dm-brand b { font-size: 1rem; letter-spacing: .02em; }
.dm-brand img { display: block; }
.dm-main { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 0 20px 40px; box-sizing: border-box; }

/* ---- start screen ---- */
.dm-intro-screen { text-align: center; padding: 28px 0 8px; max-width: 760px; margin: 0 auto; }
.dm-badge { display: inline-block; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.28); font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.dm-intro-screen h1 { font-family: var(--serif); font-size: clamp(2rem, 6vw, 3.1rem); line-height: 1.12; margin: 22px 0 14px; color: #fff; }
.dm-lede { font-size: clamp(1.02rem, 2.6vw, 1.22rem); line-height: 1.55; color: rgba(255,255,255,.88); margin: 0 auto 28px; max-width: 600px; }
.dm-go { min-height: 56px; padding: 0 30px; font-size: 1.05rem; letter-spacing: .03em; display: inline-flex; align-items: center; gap: 10px; }
.dm-go svg { width: 20px; height: 20px; }
.dm-nore { margin: 16px 0 0; font-size: .96rem; color: rgba(255,255,255,.9); font-weight: 600; }
.dm-flow { list-style: none; padding: 0; margin: 34px 0 20px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; counter-reset: f; }
.dm-flow li { counter-increment: f; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); font-size: .85rem; color: rgba(255,255,255,.9); }
.dm-flow li::before { content: counter(f) ". "; opacity: .7; }
.dm-what { font-size: .98rem; line-height: 1.55; color: rgba(255,255,255,.88); margin: 0 auto 14px; max-width: 580px; }
.dm-which { font-size: .88rem; color: rgba(255,255,255,.72); margin: 0 auto; max-width: 520px; line-height: 1.5; }
.dm-noscript { background: #fff; color: var(--ink); padding: 12px 16px; border-radius: var(--radius); margin-top: 20px; }

/* ---- course frame ---- */
.dm-frame { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; margin-top: 4px; scroll-margin-top: 8px; }
.dm-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; background: var(--navy); color: #fff; }
.dm-bar-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dm-tag { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.75); font-weight: 700; }
.dm-bar b { font-size: 1.02rem; }
.dm-time { font-size: .8rem; color: rgba(255,255,255,.8); white-space: nowrap; }
.dm-progress { padding: 14px 18px 10px; border-bottom: 1px solid var(--line); }
.dm-count { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.dm-name { color: var(--muted); font-weight: 600; }
.dm-prog { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.dm-prog span { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 99px; transition: width .35s ease; }
.dm-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 10px 0 0; }
.dm-steps li { flex: 1; display: flex; align-items: center; gap: 6px; font-size: .74rem; color: var(--faint); min-width: 0; }
.dm-steps .n { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--line); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; }
.dm-steps .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-steps li.on { color: var(--navy); font-weight: 700; }
.dm-steps li.on .n { background: var(--brand); color: #fff; }
.dm-steps li.done .n { background: var(--green); color: #fff; }

.dm-body { padding: 22px 22px 14px; min-height: 340px; }
.dm-h { font-family: var(--serif); font-size: clamp(1.35rem, 3.6vw, 1.75rem); line-height: 1.2; margin: 0 0 10px; color: var(--navy); outline: none; }
.dm-lead { margin: 0 0 18px; color: var(--muted); line-height: 1.55; font-size: 1rem; max-width: 70ch; }
.dm-sub3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.dm-from { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 4px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); }

/* group colour coding (slide point <-> course part) */
.g-a { --gc: var(--brand); --gs: #e8edff; }
.g-b { --gc: var(--green); --gs: #e7f6ec; }
.g-c { --gc: var(--gold); --gs: #fdf3dc; }
.dm-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--gc, var(--muted)); display: inline-block; }

/* ---- before / after ---- */
.dm-ba { display: grid; grid-template-columns: 1fr 34px 1fr; gap: 10px; align-items: stretch; }
.dm-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dm-pill { align-self: flex-start; padding: 5px 11px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .05em; }
.dm-pill.before { background: #eceff3; color: #4a5565; border: 1px solid #cdd3dc; }
.dm-pill.after { background: var(--brand); color: #fff; }
.dm-mid { display: flex; align-items: center; justify-content: center; color: var(--brand); }
.dm-mid svg { width: 28px; height: 28px; }
.dm-ppt { flex: 1; background: #fff; border: 1px solid #c9ced6; border-radius: 4px; box-shadow: 0 2px 6px rgba(0,0,0,.12); overflow: hidden; font-family: Arial, Helvetica, sans-serif; }
.dm-ppt-top { background: #44546a; color: #fff; font-size: .68rem; padding: 6px 12px; }
.dm-ppt h3 { margin: 12px 14px 6px; font-size: 1.15rem; color: #1f2d44; }
.dm-ppt ul { list-style: none; margin: 0; padding: 0 8px 12px; }
.dm-bul { width: 100%; display: flex; gap: 8px; align-items: flex-start; text-align: left; padding: 9px 8px; min-height: 44px; border: 2px solid transparent; border-radius: 6px; background: transparent; cursor: pointer; font: inherit; font-size: .9rem; color: #2b3548; line-height: 1.35; }
.dm-bul .dm-dot { margin-top: 5px; }
.dm-bul:hover { background: var(--gs); }
.dm-bul.on { background: var(--gs); border-color: var(--gc); }
.dm-after { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dm-out { flex: 1; text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 11px 13px; min-height: 44px; background: #fff; border: 2px solid var(--line); border-left: 6px solid var(--gc); border-radius: 8px; cursor: pointer; font: inherit; color: var(--ink); }
.dm-out-tag { display: inline-flex; align-items: center; gap: 7px; font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.dm-out b { font-size: .95rem; color: var(--navy); }
.dm-out-b { font-size: .84rem; color: var(--muted); line-height: 1.4; }
.dm-out.on { background: var(--gs); border-color: var(--gc); box-shadow: 0 0 0 3px var(--glow); }
.dm-cap { margin: 14px 0 0; font-weight: 700; color: var(--navy); text-align: center; }

/* ---- lesson cards ---- */
.dm-cards { display: grid; gap: 10px; }
.dm-card { text-align: left; background: #fff; border: 2px solid var(--line); border-left: 6px solid var(--brand); border-radius: 10px; padding: 14px 16px; cursor: pointer; font: inherit; color: var(--ink); min-height: 52px; }
.dm-card:hover { border-color: var(--brand); }
.dm-card-h { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--navy); font-size: 1.02rem; }
.dm-card-h i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; background: #e8edff; color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.dm-card.open { background: #e8edff; }
.dm-card.open .dm-card-h i { background: var(--green); color: #fff; }
.dm-card-b { display: block; margin-top: 8px; line-height: 1.55; color: var(--ink); }
.dm-card-b[hidden] { display: none; }

/* ---- sequence activity ---- */
.dm-seq { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dm-slots, .dm-pool { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dm-slots li { display: flex; gap: 10px; align-items: center; min-height: 48px; padding: 8px 12px; border: 2px dashed var(--line2); border-radius: 10px; color: var(--faint); font-size: .92rem; }
.dm-slots li.full { border-style: solid; border-color: var(--green); background: #eaf7ee; color: var(--ink); }
.dm-slots .n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--line); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .78rem; }
.dm-slots li.full .n { background: var(--green); color: #fff; }
.dm-chip { text-align: left; min-height: 48px; padding: 10px 14px; background: #fff; border: 2px solid var(--brand); border-radius: 10px; font: inherit; font-size: .92rem; color: var(--navy); cursor: pointer; }
.dm-chip:hover { background: #e8edff; }
.dm-ok { margin: 0; color: var(--green); font-weight: 700; }
.dm-reset { margin-top: 10px; background: none; border: 0; padding: 10px 4px; min-height: 44px; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.dm-reset[hidden] { display: none; }

/* ---- scenario + quiz options ---- */
.dm-opts { display: grid; gap: 10px; }
.dm-opt { text-align: left; min-height: 52px; padding: 12px 16px; background: #fff; border: 2px solid var(--line2); border-radius: 10px; font: inherit; color: var(--ink); cursor: pointer; line-height: 1.4; }
.dm-opt:hover:not(:disabled) { border-color: var(--brand); background: #e8edff; }
.dm-opt:disabled { cursor: default; opacity: .75; }
.dm-opt.ok { border-color: var(--green); background: #eaf7ee; opacity: 1; font-weight: 700; }
.dm-opt.no { border-color: var(--red); background: #fdecec; opacity: 1; }
.dm-q h3 { margin: 4px 0 12px; font-size: 1.1rem; color: var(--navy); }
.dm-qn { margin: 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.dm-fb { margin: 14px 0 0; padding: 0; min-height: 1.4em; line-height: 1.5; font-weight: 600; }
.dm-fb.ok { color: #14753a; }
.dm-fb.bad { color: #b3261e; }
.no { animation: dmShake .35s; }
@keyframes dmShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---- completion ---- */
.dm-done { text-align: center; max-width: 640px; margin: 0 auto; padding: 8px 0 14px; }
.dm-done-ic { width: 60px; height: 60px; border-radius: 50%; background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.dm-done-ic svg { width: 30px; height: 30px; }
.dm-score { font-size: 1.05rem; margin: 0 0 10px; color: var(--navy); }
.dm-imagine { font-family: var(--serif); font-size: clamp(1.3rem, 4vw, 1.75rem); line-height: 1.25; color: var(--navy); margin: 22px 0 18px; }
.dm-done-cta { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.dm-done-cta .btn { min-height: 54px; width: 100%; max-width: 380px; justify-content: center; }
.dm-small { margin: 22px 0 0; font-size: .88rem; color: var(--muted); }
.dm-link { background: none; border: 0; padding: 10px 4px; min-height: 44px; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; }
.dm-copied { color: var(--green); font-weight: 700; }

/* ---- nav ---- */
.dm-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); background: #fff; }
.dm-nav[hidden], #dmBack[hidden] { display: none; }
.dm-nav .btn { min-height: 48px; min-width: 110px; justify-content: center; display: inline-flex; align-items: center; gap: 8px; }
.dm-nav .btn svg { width: 18px; height: 18px; }
.dm-nav .btn:disabled { opacity: .45; cursor: not-allowed; }
.dm-hint { flex: 1; text-align: center; font-size: .85rem; color: var(--muted); }
#dmBack[hidden] + .dm-hint { text-align: left; }

.dm-foot { text-align: center; font-size: .78rem; line-height: 1.5; padding: 16px 20px 24px; color: var(--muted); }
.dm-start .dm-foot { color: rgba(255,255,255,.6); }
.dm-foot a { color: inherit; text-decoration: underline; margin-left: 6px; }
.dm-page button:focus-visible, .dm-page a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---- mobile ---- */
@media (max-width: 720px) {
  .dm-main { padding: 0 12px 24px; }
  .dm-intro-screen { padding-top: 14px; }
  .dm-go { width: 100%; justify-content: center; padding: 0 16px; }
  .dm-ba { grid-template-columns: 1fr; }
  .dm-mid { height: 28px; }
  .dm-mid svg { transform: rotate(90deg); }
  .dm-seq { grid-template-columns: 1fr; }
  .dm-steps .l { display: none; }
  .dm-steps li { justify-content: center; }
  .dm-body { padding: 18px 14px 14px; min-height: 280px; }
  .dm-bar { padding: 10px 14px; }
  .dm-nav { position: sticky; bottom: 0; z-index: 5; box-shadow: 0 -4px 14px rgba(0,0,0,.08); padding: 10px 12px; }
  .dm-hint { font-size: .76rem; }
  .dm-nav .btn { min-width: 96px; padding-left: 14px; padding-right: 14px; }
  .dm-frame { border-radius: 10px; }
}
@media (max-width: 360px) { .dm-hint { display: none; } .dm-nav { justify-content: space-between; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dm-prog span { transition: none; }
  .no { animation: none; }
}

/* ===== v20261118a: five-stage course (Learn / Apply / Practice / Knowledge Check / Completion) ===== */
.dm-kick { margin: 0 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.dm-c { margin-left: auto; margin-right: auto; }
.dm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dm-sub { margin: 22px 0 6px; font-size: 1.05rem; color: var(--navy); }
.dm-pgs { display: flex; gap: 8px; margin: 0 0 14px; }
.dm-pg { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line2); background: #fff; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.dm-pg.seen { border-color: var(--green); color: var(--green); }
.dm-pg.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.dm-ppt ul { list-style: disc; margin: 0; padding: 0 14px 14px 32px; font-size: .92rem; line-height: 1.5; color: #2b3548; }
.dm-ppt-top { display: flex; justify-content: space-between; gap: 8px; }
.dm-lesson { flex: 1; background: #fff; border: 2px solid var(--line); border-left: 6px solid var(--brand); border-radius: 8px; padding: 14px 16px; }
.dm-lesson p { margin: 0 0 12px; line-height: 1.6; }
.dm-tipbtn { background: #e8edff; color: var(--brand); border: 0; border-radius: 8px; min-height: 44px; padding: 0 14px; font: inherit; font-weight: 700; cursor: pointer; }
.dm-tip { margin: 12px 0 0 !important; padding: 10px 12px; background: #fdf3dc; border-radius: 8px; font-size: .92rem; }
.dm-tip[hidden] { display: none; }
.dm-scn { background: #e8edff; border-left: 6px solid var(--brand); border-radius: 8px; padding: 14px 16px; margin: 0 0 14px; font-size: 1.05rem; line-height: 1.5; }
.dm-scn p { margin: 0; }
.dm-opt.picked { border-color: var(--brand); background: #e8edff; font-weight: 700; }
.dm-conseq { padding: 14px 16px; border-radius: 8px; line-height: 1.55; border-left: 6px solid var(--gold); background: #fdf3dc; }
.dm-conseq.good { border-left-color: var(--green); background: #eaf7ee; }
.dm-asl { width: 100%; border-collapse: collapse; margin: 6px 0 0; font-size: .95rem; }
.dm-asl caption { text-align: left; font-weight: 700; color: var(--navy); padding: 0 0 6px; }
.dm-asl th, .dm-asl td { padding: 10px 10px; border: 1px solid var(--line); text-align: left; vertical-align: middle; }
.dm-asl thead th { background: var(--navy); color: #fff; font-size: .8rem; }
.dm-asl tr.ok td { background: #eaf7ee; }
.dm-asl tr.no td { background: #fdecec; }
.dm-use { min-height: 44px; font-size: .85rem; white-space: nowrap; }
.dm-sum { margin: 14px auto 18px; border-collapse: collapse; font-size: .95rem; text-align: left; min-width: min(100%, 420px); }
.dm-sum th, .dm-sum td { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.dm-sum th { font-weight: 600; color: var(--muted); }
.dm-sum td { font-weight: 700; color: var(--navy); }
.dm-certact { flex-direction: row; justify-content: center; flex-wrap: wrap; margin: 18px 0 6px; }
.dm-certact .btn { width: auto; max-width: none; padding: 0 22px; }
.dm-nocred { text-align: center; font-size: .86rem; color: var(--muted); margin: 8px 0 0; }
.dm-imagine-wrap { text-align: center; max-width: 640px; margin: 30px auto 0; padding: 22px 0 6px; border-top: 1px solid var(--line); }
.dm-imagine-wrap p { margin: 0 0 16px; line-height: 1.6; color: var(--ink); }
.dm-imagine { margin: 0 0 12px; }

/* sample certificate (HTML version; the PDF mirrors it) */
.dm-cert { position: relative; overflow: hidden; max-width: 720px; margin: 22px auto 0; padding: 26px 28px 20px; background: #fffdf8; border: 3px solid var(--navy); outline: 1px solid #a97e28; outline-offset: -9px; text-align: center; font-family: var(--serif); color: #191d27; }
.dm-cert > * { position: relative; z-index: 1; }
.dm-wm { position: absolute !important; inset: 0; z-index: 2 !important; display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(-24deg); color: rgba(194,65,12,.15); font: 800 clamp(3rem, 14vw, 6.2rem)/1 Arial, Helvetica, sans-serif; pointer-events: none; user-select: none; }
.dm-wm small { font-size: .5em; letter-spacing: .06em; }
.dm-cert-logo { display: block; margin: 0 auto 4px; width: 120px; height: auto; }
.dm-cert-org { margin: 0; font: 700 .78rem Arial, Helvetica, sans-serif; letter-spacing: .3em; color: var(--brand); }
.dm-cert h3 { margin: 12px 0 4px; font-size: clamp(1.05rem, 3.6vw, 1.55rem); letter-spacing: .04em; color: var(--navy); }
.dm-cert-s { margin: 10px 0 4px; font: .86rem Arial, Helvetica, sans-serif; color: #586275; }
.dm-cert-course { margin: 0; font-size: clamp(1.5rem, 5.4vw, 2.1rem); font-weight: 700; }
.dm-cert-i { margin: 6px auto 12px; max-width: 520px; font-style: italic; color: #586275; font-size: .95rem; line-height: 1.4; }
.dm-cert-to { margin: 0 0 14px; }
.dm-cert-to span { display: block; font: 700 .68rem Arial, Helvetica, sans-serif; letter-spacing: .2em; color: #586275; }
.dm-cert-to b { display: inline-block; min-width: 55%; font-size: 1.4rem; font-style: italic; font-weight: 400; color: var(--navy); border-bottom: 1px solid #586275; }
.dm-cert-band { display: inline-block; margin: 0; padding: 7px 14px; background: var(--navy); color: #fff; font: 700 clamp(.62rem, 2.4vw, .8rem) Arial, Helvetica, sans-serif; letter-spacing: .06em; }
.dm-cert-fine { margin: 8px 0 0; font: .66rem Arial, Helvetica, sans-serif; color: #586275; }

/* enlarged certificate dialog */
.dm-modal { position: fixed; inset: 0; z-index: 1000; background: rgba(11,18,48,.78); display: flex; align-items: center; justify-content: center; padding: 14px; overflow: auto; }
.dm-modal-in { position: relative; background: #fff; border-radius: 12px; padding: 40px 16px 16px; width: min(860px, 100%); max-height: 100%; overflow: auto; }
.dm-modal-in .dm-cert { margin-top: 0; }
.dm-modal-in .dm-done-cta { flex-direction: row; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.dm-modal-in .dm-done-cta .btn { width: auto; }
.dm-x { position: absolute; top: 4px; right: 8px; width: 44px; height: 44px; border: 0; background: none; font-size: 2rem; line-height: 1; cursor: pointer; color: var(--navy); }

@media (max-width: 720px) {
  .dm-asl thead { position: absolute; left: -9999px; }
  .dm-asl, .dm-asl tbody, .dm-asl tr, .dm-asl td { display: block; width: 100%; box-sizing: border-box; }
  .dm-asl tr { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 10px; overflow: hidden; }
  .dm-asl td { border: 0; padding: 6px 12px; }
  .dm-asl td[data-l]::before { content: attr(data-l) ": "; font-weight: 700; color: var(--muted); }
  .dm-use { width: 100%; margin: 4px 0 6px; }
  .dm-cert { padding: 18px 14px 14px; }
  .dm-cert-logo { width: 96px; }
  .dm-certact .btn { width: 100%; }
}
