/* BowTie Manager — public landing page (/welcome). Loaded only by layouts/public.php.
   Builds on app.css tokens (--btm-navy, --btm-amber …). No inline styles (CSP). */

body.lp { background: #fff; color: var(--btm-ink); }
body.lp main { outline: none; }
.lp section[id] { scroll-margin-top: 4.5rem; }

/* ---- Top bar ---------------------------------------------------------------- */
.lp-top { position: sticky; top: 0; z-index: 1030; background: var(--btm-navy-deep); border-bottom: 3px solid var(--btm-amber); }
.lp-top .navbar { padding-top: .55rem; padding-bottom: .55rem; }
.lp-top .navbar-brand { font-weight: 700; color: #fff; }
.lp-top .nav-link { color: #d6e6f2; }
.lp-top .nav-link:hover, .lp-top .nav-link:focus-visible { color: #fff; }

/* ---- Type --------------------------------------------------------------------- */
.lp-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--btm-amber); margin-bottom: .6rem; }
.lp-eyebrow-dark { color: #9a6a00; }
.lp-h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; margin-bottom: 1rem; }
.lp-h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 800; letter-spacing: -.015em; margin-bottom: .6rem; }
.lp-h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .4rem; }
.lp-h3-lg { font-size: 1.4rem; font-weight: 800; margin-bottom: .6rem; }
.lp-lead { font-size: 1.18rem; color: #d6e6f2; max-width: 34rem; margin-bottom: 1.6rem; }
.lp-sub { font-size: 1.08rem; color: var(--btm-muted); max-width: 40rem; }
.lp-head { margin-bottom: 2.5rem; max-width: 44rem; }

/* ---- Hero --------------------------------------------------------------------- */
.lp-hero {
  color: #fff; padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(1100px 500px at 85% 10%, rgba(242,169,0,.14), transparent 60%),
    linear-gradient(160deg, var(--btm-navy-deep) 0%, var(--btm-navy) 60%, #11577f 100%);
}
.lp-ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; color: #d6e6f2; font-size: .95rem; }
.lp-ticks .bi { color: var(--btm-amber); margin-right: .2rem; }
.lp-hero .btn-warning { --bs-btn-bg: var(--btm-amber); --bs-btn-border-color: var(--btm-amber); --bs-btn-hover-bg: #ffbe2e; --bs-btn-hover-border-color: #ffbe2e; font-weight: 700; color: #1a1300; }
.lp-top .btn-warning { --bs-btn-bg: var(--btm-amber); --bs-btn-border-color: var(--btm-amber); font-weight: 700; color: #1a1300; }

/* Hero card: the example bow tie drawn by bowtie-svg.js (same look as the editor) */
.lp-hero-card { margin: 0; background: #fff; border-radius: .9rem; padding: .75rem .75rem 0; box-shadow: 0 24px 60px rgba(0,0,0,.35); border-top: 4px solid var(--btm-amber); }
.lp-hero-card { position: relative; }
.lp-enlarge { position: absolute; top: .5rem; right: .5rem; z-index: 2; background: rgba(255,255,255,.92); border: 1px solid var(--btm-line); color: var(--bs-primary); font-size: .8rem; }
.lp-enlarge:hover { background: #fff; border-color: var(--bs-primary); }
.lp-bt { min-height: 10rem; }
.lp-bt-large { overflow: auto; padding: .5rem; }
.lp-bt-large svg { display: block; width: 100%; min-width: 56rem; height: auto; }
.lp-bt svg { display: block; width: 100%; height: auto; }
.lp-bt-fallback { display: block; width: 100%; height: auto; }
.lp-app-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1rem; padding: .5rem .25rem .6rem; color: var(--btm-muted); font-size: .8rem; }
.lp-sw { display: inline-block; width: .75rem; height: .75rem; border-radius: .15rem; vertical-align: -.1rem; margin-right: .2rem; border: 1px solid rgba(0,0,0,.25); }
.lp-sw-ok { background: #2E7D32; } .lp-sw-deg { background: #F9A825; } .lp-sw-imp { background: #BF360C; } .lp-sw-ef { background: #FFF3E0; border-color: #E65100; }

/* Sign-in dialog */
.lp-signin { border-top: 4px solid var(--btm-amber); }
.lp-signin .btm-auth-brand { font-size: 1.05rem; }

/* ---- Strip -------------------------------------------------------------------- */
.lp-strip { background: var(--btm-surface); border-bottom: 1px solid var(--btm-line); }
.lp-strip-list { list-style: none; margin: 0; padding: 1.1rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .75rem 1.5rem; font-size: .93rem; color: var(--btm-muted); }
.lp-strip-list .bi { color: var(--bs-primary); margin-right: .35rem; }

/* ---- Sections ----------------------------------------------------------------- */
.lp-section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.lp-alt { background: var(--btm-surface); }
.lp-card { height: 100%; background: #fff; border: 1px solid var(--btm-line); border-radius: .75rem; padding: 1.5rem; transition: box-shadow .15s ease, transform .15s ease; }
.lp-card:hover { box-shadow: 0 10px 30px rgba(11,61,92,.10); transform: translateY(-2px); }
.lp-card p, .lp-role p, .lp-step p, .lp-trust p { margin: 0; color: var(--btm-muted); }
.lp-icon { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: .6rem; background: #e8f1f8; color: var(--bs-primary); font-size: 1.35rem; margin-bottom: 1rem; }

/* Tour */
.lp-tour + .lp-tour { margin-top: clamp(2.5rem, 6vw, 5rem); }
.lp-shot { margin: 0; border-radius: .75rem; overflow: hidden; border: 1px solid var(--btm-line); box-shadow: 0 18px 50px rgba(11,61,92,.16); background: #fff; }
.lp-shot img { display: block; width: 100%; height: auto; }
.lp-list { padding-left: 0; list-style: none; margin: 1rem 0 0; }
.lp-list li { position: relative; padding-left: 1.6rem; margin-bottom: .45rem; }
.lp-list li::before { content: "\F26A"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: 0; color: #2E7D32; }

/* Steps */
.lp-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem; counter-reset: none; }
.lp-step { position: relative; padding: 1.5rem 1.25rem 1.25rem; border-top: 4px solid var(--btm-amber); background: #fff; border-radius: 0 0 .6rem .6rem; box-shadow: 0 4px 18px rgba(11,61,92,.08); }
.lp-step-n { position: absolute; top: -1.15rem; right: 1rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--btm-navy); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.lp-step .bi { color: var(--bs-primary); margin-right: .25rem; }

/* Roles */
.lp-role { height: 100%; background: #fff; border: 1px solid var(--btm-line); border-left: 4px solid var(--bs-primary); border-radius: .5rem; padding: 1rem 1.1rem; font-size: .93rem; }
.lp-role-note { border-left-color: var(--btm-amber); }

/* Trust (dark) */
.lp-dark { background: var(--btm-navy-deep); color: #fff; }
.lp-dark .lp-sub { color: #b9cddc; }
.lp-trust { display: flex; gap: 1rem; height: 100%; padding: 1.25rem; border-radius: .6rem; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.lp-trust > .bi { font-size: 1.6rem; color: var(--btm-amber); line-height: 1; }
.lp-dark .lp-trust p { color: #b9cddc; }

/* CTA + footer */
.lp-cta { padding: clamp(3.5rem, 7vw, 5.5rem) 0; background: linear-gradient(180deg, #fff 0%, #eef4f9 100%); }
.lp-cta .lp-sub { margin-bottom: 1.5rem; }
.lp-foot { background: var(--btm-navy-deep); color: #b9cddc; padding: 1.5rem 0; font-size: .9rem; }
.lp-foot a { color: #d6e6f2; }
.lp-foot .btm-mark::after { border-right-color: #fff; }

@media (max-width: 767.98px) {
  .lp-top .navbar-collapse { padding-bottom: .5rem; }
}

/* Flash messages (e.g. "You have been signed out") float under the top bar */
.lp-toasts { position: fixed; top: 4.6rem; right: 1rem; z-index: 1040; width: calc(100% - 2rem); max-width: 24rem; }
.lp-toasts .btm-flash { margin: 0; }
.lp-toasts .alert { box-shadow: 0 10px 30px rgba(0,0,0,.25); margin-bottom: .5rem; }

/* ---- Landing → tour link ---------------------------------------------------------- */
.lp-tour-more { text-align: center; margin: clamp(2.5rem, 5vw, 4rem) 0 0; }

/* ==== Guided tour (/tour) ============================================================ */
.tr-hero {
  color: #fff; padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
  background:
    radial-gradient(900px 400px at 85% 0%, rgba(242,169,0,.14), transparent 60%),
    linear-gradient(160deg, var(--btm-navy-deep) 0%, var(--btm-navy) 70%, #11577f 100%);
}
.tr-hero .lp-lead { max-width: 46rem; }
.tr-legend { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; color: #d6e6f2; font-size: .93rem; }
.tr-legend li { display: flex; align-items: center; gap: .45rem; }
.tr-legend .bi { color: var(--btm-amber); }

.tr-wrap { padding-top: 2rem; padding-bottom: 4rem; }

/* contents (sticky on large screens, scroll-spy highlights the current step) */
.tr-toc { position: sticky; top: 5rem; max-height: calc(100vh - 6rem); overflow-y: auto; padding-right: .25rem; font-size: .88rem; }
.tr-toc-title { text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; font-weight: 700; color: var(--btm-muted); margin-bottom: .5rem; }
.tr-toc-parts, .tr-toc-steps { list-style: none; padding: 0; margin: 0; }
.tr-toc-parts > li { margin-bottom: .6rem; }
.tr-toc-part { display: block; font-weight: 700; color: var(--btm-ink); text-decoration: none; margin-bottom: .15rem; }
.tr-toc-part:hover { color: var(--bs-primary); }
.tr-toc-steps .nav-link { display: flex; gap: .45rem; padding: .18rem .5rem; border-left: 2px solid var(--btm-line); color: var(--btm-muted); line-height: 1.3; }
.tr-toc-steps .nav-link:hover { color: var(--bs-primary); }
.tr-toc-steps .nav-link.active { color: var(--btm-navy); font-weight: 600; border-left-color: var(--btm-amber); background: #fff8e6; }
.tr-toc-n { flex: 0 0 1.4rem; color: inherit; opacity: .7; font-variant-numeric: tabular-nums; }
.tr-toc-mobile { border: 1px solid var(--btm-line); border-radius: .5rem; padding: .6rem .9rem; margin-bottom: 1.5rem; background: var(--btm-surface); }
.tr-toc-mobile summary { font-weight: 700; cursor: pointer; }
.tr-toc-mobile ol { margin: .5rem 0 0; padding-left: 1.25rem; }

/* roles */
.tr-roles { border: 1px solid var(--btm-line); border-radius: .75rem; padding: 1.25rem; background: var(--btm-surface); margin-bottom: 1rem; }
.tr-role { display: inline-block; padding: .15rem .55rem; border-radius: 1rem; font-size: .75rem; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.tr-role-ALL { background: #e9ecef; color: #343a40; }
.tr-role-OA  { background: #0B3D5C; color: #fff; }
.tr-role-FAC { background: #e3f0fa; color: #0b4f7a; border-color: #b7d6ee; }
.tr-role-REV { background: #f1e8fb; color: #5b2d8e; border-color: #dac6f1; }
.tr-role-APP { background: #e5f4e8; color: #1e6b2f; border-color: #bfe2c7; }
.tr-role-BO  { background: #fff3d6; color: #7a5200; border-color: #f4d48a; }
.tr-role-VW  { background: #f1f3f5; color: #495057; border-color: #dee2e6; }
.tr-legend .tr-role { font-size: .72rem; }
.tr-roles-list { list-style: none; padding: 0; margin: .35rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem; }

/* parts and steps */
.tr-part { padding-top: 3rem; }
.tr-part, .tr-step, .tr-roles { scroll-margin-top: 5rem; }   /* clear the sticky top bar */
.tr-part-head { border-top: 4px solid var(--btm-amber); padding-top: 1rem; margin-bottom: 1.5rem; }
.tr-part-n { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: #9a6a00; margin-bottom: .25rem; }
.tr-step { padding: 1.75rem 0 2rem; border-bottom: 1px solid var(--btm-line); }
.tr-step:last-child { border-bottom: 0; }
.tr-step-head { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: .75rem; }
.tr-step-n { flex: 0 0 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--btm-navy); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.tr-step-title { font-size: 1.3rem; font-weight: 800; margin: .3rem 0 0; letter-spacing: -.01em; }
.tr-intro { color: var(--btm-ink); max-width: 52rem; }

.tr-shot { margin: 1rem 0 1.1rem; }
.tr-zoom { position: relative; display: block; border-radius: .6rem; overflow: hidden; border: 1px solid var(--btm-line); box-shadow: 0 12px 36px rgba(11,61,92,.14); background: #fff; }
.tr-zoom img { display: block; width: 100%; height: auto; }
.tr-zoom-hint { position: absolute; right: .6rem; bottom: .6rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(11,61,92,.85); color: #fff; opacity: 0; transition: opacity .15s ease; }
.tr-zoom:hover .tr-zoom-hint, .tr-zoom:focus-visible .tr-zoom-hint { opacity: 1; }
.tr-zoom:focus-visible { outline: 3px solid var(--btm-amber); outline-offset: 3px; }

/* numbered points: amber pins matching the markers drawn on the screenshots */
.tr-points { list-style: none; counter-reset: tr; padding: 0; margin: 0 0 1rem; max-width: 52rem; }
.tr-points li { counter-increment: tr; position: relative; padding-left: 2.4rem; margin-bottom: .55rem; }
.tr-points li::before { content: counter(tr); position: absolute; left: 0; top: -.05rem; }
.tr-pin, .tr-points li::before {
  display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--btm-amber); color: var(--btm-navy); font-weight: 800; font-size: .85rem; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,.08);
}
.tr-tip { display: flex; gap: .6rem; max-width: 52rem; margin: 0; padding: .75rem 1rem; border-left: 4px solid var(--bs-primary); background: #eef5fb; border-radius: 0 .5rem .5rem 0; font-size: .95rem; }
.tr-tip .bi { color: var(--bs-primary); font-size: 1.1rem; line-height: 1.3; }

.tr-end { margin-top: 3rem; padding: 2rem; border-radius: .9rem; background: linear-gradient(180deg, #fff 0%, #eef4f9 100%); border: 1px solid var(--btm-line); }

/* full-size dialog */
.tr-modal-dialog { max-width: min(1720px, 96vw); }
.tr-modal-body { overflow: auto; background: var(--btm-surface); }
.tr-modal-body img { display: block; max-width: none; width: 1680px; height: auto; margin: 0 auto; }
@media (max-width: 1799.98px) { .tr-modal-body img { width: 100%; } }
@media (max-width: 991.98px) { .tr-modal-body img { width: 1100px; max-width: none; } }

@media (prefers-reduced-motion: reduce) { .tr-zoom-hint { transition: none; } }
@media print {
  .tr-toc, .tr-toc-mobile, .lp-top, .lp-foot, .tr-zoom-hint, .tr-end .btn { display: none !important; }
  .tr-step { break-inside: avoid; }
  .tr-hero { color: #000; background: none; }
}
