/* PDFB web demo - the demo's own screens: welcome, guide pop-ups, savings
   ticker and calculator, end screen, small-screen notice. Naviteer brand
   colours (navy #003C81, red accent #BF0000); the app windows are styled
   separately in app.css from the PDFB colour schemes. */

:root {
  --nv-navy: #003C81;
  --nv-navy-dark: #002a5c;
  --nv-red: #BF0000;
  --nv-red-dark: #750000;
  --nv-charcoal: #323232;
  --nv-green: #1e7b34;
  --nv-green-bg: #e9f6ec;
  --demo-font: "Segoe UI", "Segoe UI Web (West European)", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

.demo-layer { position: fixed; inset: 0; z-index: 10000; pointer-events: none; font-family: var(--demo-font); color: var(--nv-charcoal); }
.demo-layer * { box-sizing: border-box; }
.demo-layer > * { pointer-events: auto; }

/* ── Full-screen panels (welcome, end, notice) ───────────────────────────── */
.demo-screen {
  position: fixed; inset: 0; z-index: 10050; overflow: auto;
  background: radial-gradient(1200px 700px at 50% -10%, #ffffff 0%, #eef3f9 55%, #dfe7f1 100%);
  display: flex; align-items: flex-start; justify-content: center; padding: 28px 24px 40px;
  animation: demoFade .25s ease-out;
}
@keyframes demoFade { from { opacity: 0; } to { opacity: 1; } }
.demo-screen-inner { width: min(1060px, 100%); }
.demo-brandbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.demo-brandbar img.nv-logo { height: 42px; }
.demo-brandbar .demo-note { font-size: 12.5px; color: #5b6676; }
.demo-hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; align-items: center;
  background: #fff; border-radius: 14px; box-shadow: 0 10px 40px rgba(0, 40, 90, .12); padding: 26px 30px; }
.demo-hero img.hero { width: 100%; border-radius: 10px; display: block; }
.demo-hero h1 { font-size: 30px; line-height: 1.15; margin: 0 0 10px; color: var(--nv-navy); font-weight: 700; letter-spacing: -.3px; }
.demo-hero h1 span { color: var(--nv-red); }
.demo-hero p.lead { font-size: 15.5px; line-height: 1.55; margin: 0 0 14px; }
.demo-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 4px; }
.demo-fact { background: #f3f7fc; border: 1px solid #dbe5f1; border-radius: 10px; padding: 10px 12px; }
.demo-fact b { display: block; font-size: 20px; color: var(--nv-navy); }
.demo-fact small { font-size: 12px; color: #536175; line-height: 1.3; display: block; }

.demo-savings { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 12px 18px;
  background: #eef8f0; border: 1px solid #bfe0c7; border-radius: 12px; }
.demo-savings-txt { flex: 1; font-size: 14px; line-height: 1.45; color: #23412b; }
.demo-savings-txt b { color: #174f25; }
.demo-savings .demo-btn { flex: none; }
.demo-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; }
.demo-choice { position: relative; background: #fff; border: 2px solid #d6e0ec; border-radius: 14px; padding: 20px 22px 18px;
  cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; text-align: left; font: inherit; color: inherit; }
.demo-choice:hover, .demo-choice:focus-visible { border-color: var(--nv-navy); box-shadow: 0 8px 26px rgba(0, 60, 129, .16); transform: translateY(-2px); outline: none; }
.demo-choice h2 { margin: 0 0 4px; font-size: 20px; color: var(--nv-navy); }
.demo-choice .time { display: inline-block; font-size: 12px; font-weight: 600; color: #fff; background: var(--nv-navy); border-radius: 20px; padding: 2px 10px; margin-bottom: 10px; }
.demo-choice.comp .time { background: var(--nv-red); }
.demo-choice p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; }
.demo-choice ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; color: #3e4a5a; }
.demo-choice .go { position: absolute; right: 18px; bottom: 16px; font-weight: 600; color: var(--nv-navy); font-size: 14px; }
.demo-choice.comp .go { color: var(--nv-red); }
.demo-subrow { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 13px; color: #5b6676; }
.demo-link { background: none; border: 0; padding: 0; color: var(--nv-navy); text-decoration: underline; cursor: pointer; font: inherit; }

/* ── Guide pop-up ─────────────────────────────────────────────────────────── */
.demo-block { position: fixed; background: transparent; z-index: 10010; }
.demo-spot { position: fixed; z-index: 10011; border-radius: 6px; pointer-events: none;
  box-shadow: 0 0 0 4px rgba(191, 0, 0, .85), 0 0 0 9999px rgba(10, 20, 40, .42); transition: all .25s ease; }
.demo-spot.nodim { box-shadow: 0 0 0 4px rgba(191, 0, 0, .85), 0 0 18px 6px rgba(191, 0, 0, .35); }
.demo-spot.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 8px; border: 3px solid rgba(191, 0, 0, .7);
  animation: demoPulse 1.4s ease-out infinite; }
@keyframes demoPulse { from { transform: scale(1); opacity: .9; } to { transform: scale(1.08); opacity: 0; } }
.demo-dim { position: fixed; inset: 0; z-index: 10010; background: rgba(10, 20, 40, .42); }

.demo-card { position: fixed; z-index: 10020; width: 400px; max-width: calc(100vw - 24px); background: #fff; border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 20, 50, .35), 0 0 0 1px rgba(0, 40, 90, .08); overflow: hidden; animation: demoPop .2s ease-out; }
.demo-card.wide { width: 520px; }
@keyframes demoPop { from { transform: translateY(6px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.demo-card-head { display: flex; align-items: center; gap: 10px; background: var(--nv-navy); color: #fff; padding: 9px 12px 9px 12px; cursor: move; user-select: none; }
.demo-card-head img { width: 22px; height: 22px; background: #fff; border-radius: 50%; padding: 1px; }
.demo-card-head .ttl { font-size: 13px; font-weight: 600; flex: 1; letter-spacing: .2px; }
.demo-card-head .step { font-size: 11.5px; opacity: .85; }
.demo-card-head button { background: rgba(255, 255, 255, .14); border: 0; color: #fff; width: 24px; height: 22px; border-radius: 4px; cursor: pointer; font-size: 13px; line-height: 1; }
.demo-card-head button:hover { background: rgba(255, 255, 255, .28); }
.demo-progress { height: 3px; background: #dfe6ef; }
.demo-progress > i { display: block; height: 100%; background: var(--nv-red); transition: width .3s; }
.demo-card-body { padding: 14px 16px 6px; font-size: 14px; line-height: 1.52; max-height: 52vh; overflow: auto; }
.demo-card-body h3 { margin: 0 0 6px; font-size: 16.5px; color: var(--nv-navy); }
.demo-card-body p { margin: 0 0 9px; }
.demo-card-body ul, .demo-card-body ol { margin: 0 0 9px; padding-left: 20px; }
.demo-card-body li { margin-bottom: 3px; }
.demo-card-body kbd { font: 12px/1 var(--demo-font); border: 1px solid #c7cfda; border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px; background: #f6f8fb; }
.demo-card-body .do { display: block; background: #fff7e6; border: 1px solid #f0d49a; border-radius: 8px; padding: 7px 10px; margin: 6px 0 9px; font-size: 13.5px; }
.demo-card-body .do::before { content: "Your turn: "; font-weight: 700; color: #8a5a00; }
.demo-card-body .why { display: block; background: #f1f6fc; border-left: 3px solid var(--nv-navy); padding: 6px 10px; margin: 6px 0 9px; font-size: 13px; color: #33445a; }
.demo-card-body .save { display: block; background: var(--nv-green-bg); border: 1px solid #b9dfc3; border-radius: 8px; padding: 7px 10px; margin: 6px 0 9px; font-size: 13.5px; color: #174f25; }
.demo-card-body .save b { color: var(--nv-green); }
.demo-card-foot { display: flex; align-items: center; gap: 8px; padding: 8px 14px 12px; }
.demo-card-foot .sp { flex: 1; }
.demo-btn { font: 600 13px var(--demo-font); border-radius: 7px; padding: 7px 14px; border: 1px solid #b9c4d3; background: #fff; color: var(--nv-charcoal); cursor: pointer; }
.demo-btn:hover { background: #f2f5f9; }
.demo-btn.primary { background: var(--nv-navy); border-color: var(--nv-navy); color: #fff; }
.demo-btn.primary:hover { background: var(--nv-navy-dark); }
.demo-btn.red { background: var(--nv-red); border-color: var(--nv-red); color: #fff; }
.demo-btn.red:hover { background: var(--nv-red-dark); }
.demo-btn.ghost { border-color: transparent; color: #5b6676; font-weight: 500; padding: 7px 6px; }
.demo-btn.ghost:hover { background: transparent; text-decoration: underline; }
.demo-wait { font-size: 12.5px; color: #8a5a00; display: flex; align-items: center; gap: 6px; }
.demo-wait::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #e0a100; animation: demoBlink 1s infinite; }
@keyframes demoBlink { 50% { opacity: .25; } }
.demo-arrow { position: fixed; z-index: 10021; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); box-shadow: -1px -1px 0 rgba(0, 40, 90, .08); pointer-events: none; }

.demo-mini { position: fixed; right: 18px; bottom: 60px; z-index: 10020; background: var(--nv-navy); color: #fff; border: 0; border-radius: 22px;
  padding: 9px 16px 9px 12px; font: 600 13px var(--demo-font); box-shadow: 0 6px 20px rgba(0, 30, 70, .35); cursor: pointer; display: flex; align-items: center; gap: 8px; }
.demo-mini img { width: 20px; height: 20px; background: #fff; border-radius: 50%; }

/* ── Demo bar (below the app window) ─────────────────────────────────────── */
:root { --demo-bar-h: 46px; }
.demo-ticker { position: fixed; left: 0; right: 0; bottom: 0; height: var(--demo-bar-h); z-index: 10005; display: flex; align-items: center; gap: 14px;
  background: linear-gradient(180deg, #003C81 0%, #002d63 100%); color: #dfe8f5; padding: 0 12px 0 14px; font-size: 12.5px; white-space: nowrap;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, .25); }
.demo-ticker .brand { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #fff; }
.demo-ticker .brand img { width: 24px; height: 24px; background: #fff; border-radius: 50%; padding: 1px; }
.demo-ticker .lbl { color: #b8c8de; }
.demo-ticker b { color: #fff; font-size: 13.5px; }
.demo-ticker b.green { color: #7fe39a; }
.demo-ticker .sep { width: 1px; height: 22px; background: rgba(255, 255, 255, .22); }
.demo-ticker .sp { flex: 1; }
.demo-ticker .demo-btn { padding: 5px 12px; border-radius: 16px; font-size: 12px; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .35); color: #fff; }
.demo-ticker .demo-btn:hover { background: rgba(255, 255, 255, .24); }
.demo-ticker .demo-btn.red { background: var(--nv-red); border-color: var(--nv-red); }
.demo-ticker.flash { animation: demoFlash 1.2s ease-out; }
@keyframes demoFlash { 0% { box-shadow: 0 0 0 0 rgba(127, 227, 154, .9) inset; } 100% { box-shadow: 0 0 0 40px rgba(127, 227, 154, 0) inset; } }
.demo-pick { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 4px; }
.demo-pick label { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #d6e0ec; border-radius: 8px; padding: 8px 10px; cursor: pointer; font-size: 13px; }
.demo-pick label:hover { border-color: var(--nv-navy); background: #f6f9fd; }
.demo-pick label b { display: block; color: var(--nv-navy); }
.demo-pick label small { color: #5b6676; }
.demo-pick input { margin-top: 3px; accent-color: var(--nv-navy); }

/* ── Modal (calculator, compare) ─────────────────────────────────────────── */
.demo-modal-wrap { position: fixed; inset: 0; z-index: 10070; background: rgba(10, 20, 40, .5); display: flex; align-items: center; justify-content: center; padding: 20px; animation: demoFade .2s; }
.demo-modal { width: min(820px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 20, 50, .4); }
.demo-modal-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #e3e9f1; }
.demo-modal-head h2 { margin: 0; font-size: 19px; color: var(--nv-navy); flex: 1; }
.demo-modal-head .x { background: none; border: 0; font-size: 22px; color: #6b7686; cursor: pointer; }
.demo-modal-body { padding: 16px 20px 20px; font-size: 14px; line-height: 1.5; }
.calc-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 22px; }
.calc-in label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 4px; color: #33445a; }
.calc-in .calc-row { display: block; margin-bottom: 13px; }
.calc-in .inp { display: flex; align-items: center; border: 1px solid #c3cddb; border-radius: 8px; overflow: hidden; background: #fff; }
.calc-in .inp span { white-space: nowrap; padding: 0 10px; color: #6b7686; font-size: 13px; background: #f4f7fa; align-self: stretch; display: flex; align-items: center; }
.calc-in input { border: 0; padding: 8px 10px; font: 15px var(--demo-font); width: 100%; min-width: 0; flex: 1; outline: none; color: #1e1e1e; background: #fff; }
.calc-in input[type=range] { padding: 0; margin-top: 8px; accent-color: var(--nv-navy); display: block; width: 100%; }
.calc-in small { color: #6b7686; font-size: 12px; display: block; margin-top: 3px; }
.calc-out { background: linear-gradient(160deg, #f4f8fd 0%, #eaf2fb 100%); border: 1px solid #d5e2f1; border-radius: 12px; padding: 14px 16px; }
.calc-big { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.calc-big div { background: #fff; border-radius: 10px; padding: 10px 12px; border: 1px solid #dbe5f1; }
.calc-big b { display: block; font-size: 25px; color: var(--nv-navy); line-height: 1.15; }
.calc-big b.money { color: var(--nv-green); }
.calc-big small { color: #536175; font-size: 12px; }
.calc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.calc-table td { padding: 5px 4px; border-bottom: 1px solid #dde6f0; }
.calc-table td:last-child { text-align: right; font-weight: 600; }
.calc-bars { margin: 12px 0 2px; }
.calc-bar { display: grid; grid-template-columns: 110px 1fr 70px; align-items: center; gap: 8px; font-size: 12.5px; margin-bottom: 6px; }
.calc-bar i { display: block; height: 14px; border-radius: 4px; background: #9fb2c9; transition: width .3s; }
.calc-bar.pdfb i { background: var(--nv-navy); }
.calc-note { font-size: 12px; color: #5b6676; margin-top: 10px; }

/* ── End screen ───────────────────────────────────────────────────────────── */
.demo-end-card { background: #fff; border-radius: 14px; box-shadow: 0 10px 40px rgba(0, 40, 90, .12); padding: 26px 30px; }
.demo-end-card h1 { margin: 0 0 6px; color: var(--nv-navy); font-size: 28px; }
.demo-end-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.demo-end-grid div { background: #f3f7fc; border: 1px solid #dbe5f1; border-radius: 10px; padding: 12px; }
.demo-end-grid b { display: block; font-size: 24px; color: var(--nv-navy); }
.demo-end-grid b.green { color: var(--nv-green); }
.demo-end-grid small { font-size: 12px; color: #536175; }
.demo-cta { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 8px; }
.demo-cta a { display: block; text-decoration: none; border-radius: 12px; padding: 16px 18px; color: #fff; background: var(--nv-red); box-shadow: 0 6px 18px rgba(191, 0, 0, .25); }
.demo-cta a:hover { filter: brightness(1.08); }
.demo-cta a b { display: block; font-size: 18px; margin-bottom: 3px; }
.demo-cta a span { font-size: 13px; opacity: .92; }
.demo-end-proj { margin: 4px 0 16px; padding: 12px 16px; border-radius: 10px; background: var(--nv-green-bg); border: 1px solid #b9dfc3; color: #174f25; font-size: 15px; }
.demo-end-proj b { color: var(--nv-green); font-size: 17px; }
.demo-end-proj .demo-link { color: #174f25; }
.demo-end-more { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }

/* ── Small-screen notice ─────────────────────────────────────────────────── */
.demo-notice { max-width: 520px; margin: 10vh auto 0; background: #fff; border-radius: 14px; padding: 26px; text-align: center; box-shadow: 0 10px 40px rgba(0, 40, 90, .14); }
.demo-notice img { height: 40px; margin-bottom: 12px; }
.demo-notice h2 { color: var(--nv-navy); margin: 0 0 8px; }
.demo-notice p { line-height: 1.5; }

.demo-card.tall .demo-card-body { max-height: 66vh; }
.demo-card-body ol li, .demo-card-body ul li { line-height: 1.45; }

/* ── Training Mode ───────────────────────────────────────────────────────── */
.demo-choice.training { grid-column: 1 / -1; }
.demo-choice.training .time { background: #1d7a2f; }
.demo-choice.training .go { color: #1d7a2f; }
.hub-count { margin-left: auto; margin-right: 14px; font-size: 13px; color: #1d7a2f; font-weight: 600; }
.hub-intro { margin: 0 0 12px; line-height: 1.5; font-size: 14px; }
.hub-msg { background: #eef8f0; border: 1px solid #bfe0c7; border-radius: 8px; padding: 9px 12px; margin-bottom: 12px; color: #174f25; font-size: 14px; }
.hub-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 56vh; overflow: auto; padding: 2px; }
.hub-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; text-align: left; background: #fff; border: 1px solid #d6e0ec;
  border-radius: 10px; padding: 9px 12px; cursor: pointer; font: inherit; color: inherit; }
.hub-row:hover { border-color: var(--nv-navy); box-shadow: 0 3px 12px rgba(0, 60, 129, .12); }
.hub-row.next { border-color: var(--nv-navy); background: #f3f7fc; }
.hub-n { width: 30px; height: 30px; border-radius: 50%; background: #e7eef7; color: var(--nv-navy); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.hub-row.done .hub-n { background: #1d7a2f; color: #fff; }
.hub-t b { display: block; font-size: 14px; color: var(--nv-navy); }
.hub-t small { display: block; font-size: 12px; color: #536175; line-height: 1.35; margin-top: 2px; }
.hub-m { font-size: 12px; color: #5b6676; text-align: right; white-space: nowrap; }
.hub-m small { display: block; color: #1d7a2f; font-weight: 600; }
.hub-foot, .qfoot { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.hub-foot .sp, .qfoot .sp { flex: 1; }
.hub-foot a { color: var(--nv-navy); font-size: 13px; }
.quiz .demo-modal-body { max-height: 74vh; overflow: auto; }
.qz { margin-bottom: 16px; }
.qq { font-weight: 600; margin-bottom: 6px; font-size: 14.5px; color: #1e2b3c; }
.qo { display: flex; gap: 9px; align-items: flex-start; padding: 6px 10px; border: 1px solid #e1e7ef; border-radius: 8px; margin: 4px 0; cursor: pointer; font-size: 14px; }
.qo:hover { background: #f6f9fc; }
.qo input { margin-top: 3px; }
.qo.right { background: #eef8f0; border-color: #9fd0a9; }
.qo.wrong { background: #fdeeee; border-color: #e7a9a6; }
.qw { font-size: 13px; color: #33445a; margin-top: 4px; line-height: 1.45; }
.qscore { font-weight: 700; color: #1d7a2f; }
.demo-choice.training p { margin-bottom: 18px; }

.demo-choices.one { grid-template-columns: 1fr; }

/* Extra highlight boxes inside a tour step (step.marks) */
.demo-mark { position: fixed; z-index: 10012; pointer-events: none; border: 3px solid #BF0000; border-radius: 6px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 0 14px 4px rgba(191, 0, 0, .35); animation: demo-mark-in .35s ease-out; }
@keyframes demo-mark-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.demo-revisit { display: block; margin-top: 10px; padding: 8px 12px; border-radius: 8px; background: #eef3f9; color: #3d4a5c; font-size: 13.5px; }
.demo-card.revisit .do { opacity: .55; }

/* "Order sent to Naviteer" summary (after Approve) */
.sent-head { display: flex; gap: 16px; align-items: center; margin: 2px 0 16px; }
.sent-check { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 50%; background: #1d7a2f; color: #fff; font-size: 32px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 6px #e3f3e6; animation: sent-pop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes sent-pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.sent h3 { margin: 0 0 4px; font-size: 22px; color: #1d7a2f; }
.sent-sub { font-size: 13.5px; color: #5b6676; line-height: 1.45; }
.sent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-bottom: 16px; }
.sent-grid > div { background: #f3f6fa; border: 1px solid #dde5ef; border-radius: 8px; padding: 7px 11px; min-width: 0; }
.sent-grid span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: #6b7686; }
.sent-grid b { display: block; font-size: 14.5px; color: #1e2a3a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sent-bars { display: grid; gap: 8px; margin-bottom: 12px; }
.sent-bar { display: grid; grid-template-columns: 160px 1fr 70px; align-items: center; gap: 10px; font-size: 13.5px; }
.sent-bar i { display: block; height: 14px; border-radius: 7px; background: #b9c3cf; animation: sent-grow .9s ease-out; transform-origin: left; }
.sent-bar.pdfb i { background: #1d7a2f; }
.sent-bar b { text-align: right; }
@keyframes sent-grow { from { transform: scaleX(0); } to { transform: none; } }
.sent-save { background: #e8f5ea; border-left: 4px solid #1d7a2f; border-radius: 6px; padding: 9px 12px; font-size: 14px; color: #1e3a24; }
.demo-spot.soft { box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 0 0 9999px rgba(10, 20, 40, .42); }
.demo-card.sent-card { width: 600px; }
