/* ==========================================================================
   Cyber awareness training page (/cyber-awareness-training).
   Builds on e8.css and vciso.css. "Spot the scam" is a CSS-only checkbox
   reveal (no JavaScript; the CSP blocks inline styles and scripts).
   ========================================================================== */

/* Spot the scam ---------------------------------------------------------- */
.tr-spot { position: relative; margin-top: 26px; padding: 26px; border-radius: 22px; background: var(--navy); }
.tr-in { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tr-mail { border-radius: 14px; overflow: hidden; background: var(--white); color: var(--ink); box-shadow: 0 24px 48px -30px rgba(0, 0, 0, .7); }
.tr-mail-bar { display: flex; gap: 6px; padding: 10px 14px; background: #e3e8ef; }
.tr-mail-bar span { width: 10px; height: 10px; border-radius: 50%; background: #c3ccd8; }
.tr-mail-head { margin: 0; padding: 14px 18px 12px; display: grid; gap: 4px; box-shadow: inset 0 -1px 0 #eef1f5; }
.tr-mail-head > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; font-size: 14px; }
.tr-mail-head dt { color: var(--slate); font-weight: 600; }
.tr-mail-head dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.tr-mail-body { padding: 16px 18px 20px; display: grid; gap: 10px; font-size: 15px; line-height: 1.6; color: var(--text); }
.tr-mail-btn span { display: inline-block; padding: 8px 18px; border-radius: 8px; background: var(--blue-600); color: var(--white); font-weight: 600; font-size: 14px; }

.tr-flag { position: relative; border-radius: 4px; transition: background .2s ease, box-shadow .2s ease; }
.tr-flag::after {
    content: attr(data-n); position: absolute; top: -11px; right: -11px; z-index: 1;
    width: 20px; height: 20px; border-radius: 50%; display: none; place-items: center;
    background: #c4541a; color: var(--white); font-size: 11px; font-weight: 700; line-height: 1;
}
.tr-in:checked ~ .tr-mail .tr-flag { background: #ffe1cf; box-shadow: 0 0 0 2px #ffe1cf; }
.tr-in:checked ~ .tr-mail .tr-mail-btn .tr-flag { background: #c4541a; box-shadow: 0 0 0 3px #ffe1cf; }
.tr-in:checked ~ .tr-mail .tr-flag::after { display: grid; }

.tr-reveal {
    display: inline-flex; align-items: center; justify-content: center; margin-top: 18px; min-height: 48px; padding: 12px 26px;
    border-radius: 999px; background: var(--orange); color: var(--white); font-weight: 700; cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}
.tr-reveal:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5); }
.tr-in:focus-visible ~ .tr-reveal { outline: 3px solid var(--cream); outline-offset: 3px; }
.tr-reveal-hide { display: none; }
.tr-in:checked ~ .tr-reveal { background: #2a3d55; }
.tr-in:checked ~ .tr-reveal .tr-reveal-show { display: none; }
.tr-in:checked ~ .tr-reveal .tr-reveal-hide { display: inline; }

.tr-flags { display: none; list-style: none; padding: 0; margin-top: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; counter-reset: flag; }
.tr-in:checked ~ .tr-flags { display: grid; }
.tr-flags li { counter-increment: flag; position: relative; padding: 12px 14px 12px 48px; border-radius: 12px; background: #16293f; color: #d6dee8; font-size: 14px; line-height: 1.5; }
.tr-flags li::before {
    content: counter(flag); position: absolute; left: 14px; top: 12px; width: 22px; height: 22px; border-radius: 50%;
    display: grid; place-items: center; background: #c4541a; color: var(--white); font-size: 12px; font-weight: 700;
}
.tr-flags strong { color: var(--white); }
.tr-rule { display: none; margin-top: 14px; padding: 16px 18px; border-radius: 12px; background: var(--cream); color: var(--ink); line-height: 1.55; }
.tr-in:checked ~ .tr-rule { display: block; }
.tr-note { margin-top: 10px !important; font-size: 13px; color: var(--slate) !important; }

/* Formats ---------------------------------------------------------------- */
.tr-formats { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tr-format { padding: 26px 24px; border-radius: 18px; }
.tr-format--live { background: var(--orange); color: var(--white); }
.tr-format--online { background: var(--blue-900); color: var(--white); }
.tr-format-tag { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.tr-format h3 { margin-top: 6px; font-size: 22px; line-height: 1.3; }
.tr-format ul { list-style: none; padding: 0; margin-top: 14px; display: grid; gap: 10px; }
.tr-format li { position: relative; padding-left: 26px; font-size: 15px; line-height: 1.55; }
.tr-format li::before { content: "\2713"; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .22); font-size: 11px; font-weight: 700; }

/* Topics ----------------------------------------------------------------- */
.tr-topics { list-style: none; padding: 0; margin-top: 28px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tr-topics li { padding: 20px 18px; border-radius: 16px; background: var(--cream); }
.tr-topics li > span { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--white); font-size: 22px; }
.tr-topics h3 { margin-top: 12px; font-size: 16px; line-height: 1.3; color: var(--ink); }
.tr-topics p { margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--blue-900); }

.page-train .vc-obl a { color: var(--blue-600); text-underline-offset: 3px; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1060px) {
    .tr-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .tr-spot { padding: 18px 12px; border-radius: 16px; }
    .tr-flags, .tr-formats, .tr-topics { grid-template-columns: minmax(0, 1fr); }
    .tr-mail-head > div { grid-template-columns: 56px minmax(0, 1fr); }
    .tr-reveal { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .tr-flag, .tr-reveal { transition: none; }
}
