/* Titans Lead — student area. Same palette as the main site (styles.css). */
:root {
    --navy: #0F172A; --ink: #1F2937; --muted: #64748B; --line: #E5E7EB; --bg: #F1F5F9; --white: #FFFFFF;
    --cyan: #06B6D4; --cyan-dark: #0E7490; --cyan-soft: #ECFEFF; --green: #10B981; --green-soft: #ECFDF5;
    --amber-soft: #FFFBEB; --amber: #92400E; --red: #DC2626; --radius: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
a { color: var(--cyan-dark); }
h1, h2, h3 { color: var(--navy); line-height: 1.25; }
h1 { font-size: clamp(1.6rem, 3.6vw, 2.1rem); margin: 0 0 8px; }
h2 { font-size: 1.25rem; margin: 0 0 12px; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-block: 28px 48px; }

/* Header / footer */
.topbar { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand span { font: italic 700 1.25rem 'Outfit', sans-serif; letter-spacing: .02em; display: flex; flex-direction: column; line-height: 1; }
.brand small { font: 600 .62rem 'Saira', sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--cyan); font-style: normal; margin-top: 3px; }
.topnav { display: flex; gap: 4px; flex-wrap: wrap; }
.topnav a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem; }
.topnav a:hover, .topnav a[aria-current] { background: var(--cyan-soft); color: var(--cyan-dark); }
.foot { padding-block: 24px 40px; color: var(--muted); font-size: .85rem; text-align: center; }

/* Building blocks */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(15, 23, 42, .04); }
.card.narrow { max-width: 560px; margin-inline: auto; }
.center { text-align: center; }
.eyebrow { display: block; margin: 0 0 6px; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan-dark); }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.btn { display: inline-block; padding: 13px 22px; border-radius: 12px; border: 1px solid transparent; background: linear-gradient(135deg, #22D3EE, var(--cyan-dark)); color: var(--white); font: 600 1rem 'Inter', sans-serif; text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { filter: brightness(1.05); }
.btn:focus-visible, input:focus-visible, .opt:focus-within, .lessons a:focus-visible { outline: 3px solid rgba(6, 182, 212, .45); outline-offset: 2px; }
.btn.ghost { background: var(--white); color: var(--navy); border-color: #CBD5E1; }
.small-btn { padding: 7px 14px; font-size: .85rem; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 0; }
.center .actions { justify-content: center; }
.notice { padding: 12px 16px; border-radius: 12px; margin: 0 0 18px; border: 1px solid; }
.notice.ok { background: var(--green-soft); border-color: #A7F3D0; color: #065F46; }
.notice.warn { background: var(--amber-soft); border-color: #FDE68A; color: var(--amber); }
.notice.lock { background: var(--bg); border-color: var(--line); color: var(--muted); }
.tag { font-style: normal; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--cyan-soft); color: var(--cyan-dark); vertical-align: middle; }
.pill { display: inline-block; font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.pill.ok { background: var(--green-soft); color: #065F46; }
.pill.warn { background: var(--amber-soft); color: var(--amber); }
.bar { height: 10px; border-radius: 999px; background: #E2E8F0; overflow: hidden; margin: 14px 0 6px; max-width: 520px; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, #22D3EE, var(--green)); border-radius: 999px; }
.bar.slim { height: 7px; margin: 4px 0; min-width: 90px; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
input[type=email], input[type=text], input:not([type]) { width: 100%; padding: 12px 14px; border: 1px solid #CBD5E1; border-radius: 10px; font: inherit; background: var(--white); }
.stack { display: grid; gap: 10px; margin: 16px 0; }
.stack .btn { margin-top: 6px; }
.table-wrap { overflow-x: auto; }

/* Dashboard */
.hero-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.hero-card > div:first-child { flex: 1 1 320px; }
.cert-card { display: flex; gap: 18px; align-items: flex-start; border-color: #A7F3D0; background: linear-gradient(180deg, var(--green-soft), var(--white)); }
.cert-badge { font-size: 2.2rem; line-height: 1; }
.grid-title { margin: 30px 0 14px; }
/* Classroom grid (Skool-style): one card per section */
.section-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .section-grid { grid-template-columns: minmax(0, 1fr); } }
.section-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.section-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(15, 23, 42, .12); }
.section-card:focus-visible { outline: 3px solid rgba(6, 182, 212, .5); outline-offset: 3px; }
.section-card.current { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.sc-img { position: relative; display: block; aspect-ratio: 3 / 2; background: #E2E8F0; }
.sc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.section-card.locked .sc-img img { filter: grayscale(.7); opacity: .75; }
.sc-badge { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px; background: var(--cyan-dark); color: var(--white); font-size: .75rem; font-weight: 700; }
.sc-badge.done { background: var(--green); }
.sc-badge.lock { background: rgba(15, 23, 42, .8); }
.sc-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.sc-body .eyebrow { margin: 0; }
.sc-title { font-weight: 700; font-size: 1.08rem; color: var(--navy); line-height: 1.3; }
.sc-meta { font-size: .85rem; color: var(--muted); }
.sc-progress { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 8px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.sc-progress .bar { flex: 1; margin: 0; max-width: none; }
/* One section page */
.section-hero { display: flex; gap: 22px; align-items: center; }
.section-hero img { flex: none; width: 280px; aspect-ratio: 3 / 2; height: auto; object-fit: cover; border-radius: 12px; }
.section-hero > div { flex: 1; min-width: 0; }
.section-hero .sc-progress { max-width: 340px; margin: 6px 0 14px; padding: 0; }
@media (max-width: 640px) { .section-hero { flex-direction: column; align-items: stretch; } .section-hero img { width: 100%; } }
.lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lessons a { display: flex; align-items: center; gap: 14px; padding: 13px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.lessons a:hover { border-color: var(--cyan); }
.lstate { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--bg); color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: .82rem; font-weight: 700; }
.lesson.done .lstate { background: var(--green); color: var(--white); }
.lesson.next a { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.lesson.next .lstate, .lesson.started .lstate { background: var(--cyan-soft); color: var(--cyan-dark); }
.ltitle { flex: 1; font-weight: 600; }
.lmeta { flex: none; color: var(--muted); font-size: .85rem; }

/* Lesson */
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 8px; }
.lesson-h1 .eyebrow { margin-bottom: 4px; }
.player { background: #000; border-radius: var(--radius); overflow: hidden; margin: 16px 0 24px; aspect-ratio: 16 / 9; }
.player video, .player iframe { width: 100%; height: 100%; display: block; border: 0; }
.lesson-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 860px; }
/* Folded sections (quiz, cheat sheet): a tappable bar that opens in place */
.fold { padding: 0; margin: 0; overflow: hidden; }
.fold > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 18px 20px; cursor: pointer; font-weight: 700; color: var(--navy); font-size: 1.05rem; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ""; flex: none; width: 9px; height: 9px; margin-left: 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.fold[open] > summary::after { transform: rotate(-135deg); }
.fold > summary:hover { background: #F8FAFC; }
.fold > summary:focus-visible { outline: 3px solid rgba(6, 182, 212, .45); outline-offset: -3px; }
.fold.quiz > summary { background: var(--cyan-soft); color: var(--cyan-dark); }
.fold-icon { font-size: 1.25rem; }
.fold-title { flex: 1; }
.fold-meta { font-size: .82rem; font-weight: 500; color: var(--muted); }
.fold-body { padding: 4px 20px 22px; border-top: 1px solid var(--line); }
.fold-body > .notice:first-child, .fold-body > form:first-child { margin-top: 16px; }
.cheat-print { margin: 14px 0 4px; }
@media (max-width: 480px) { .fold-meta { display: none; } .fold > summary { padding: 16px; } .fold-body { padding: 4px 16px 18px; } }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.md { font-size: .95rem; }
.md h2, .md h3, .md h4 { font-size: 1.02rem; margin: 18px 0 6px; }
.md ul, .md ol { padding-left: 22px; margin: 6px 0; }
.md li { margin: 3px 0; }
.md table { border-collapse: collapse; width: 100%; font-size: .9rem; margin: 8px 0; }
.md th, .md td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: top; }
.md th { background: #F8FAFC; }
.md code { background: var(--bg); padding: 1px 5px; border-radius: 5px; font-size: .88em; }
.md blockquote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--cyan); background: var(--cyan-soft); }
.qlist { padding-left: 22px; margin: 0 0 16px; }
.qlist > li { margin-bottom: 18px; }
.qlist fieldset { border: 0; padding: 0; margin: 0; }
.qtext { font-weight: 600; color: var(--navy); margin: 0 0 8px; padding: 0; }
.opt { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; padding: 9px 12px; margin: 0 0 6px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.opt:hover { border-color: var(--cyan); }
.opt input { margin-top: 5px; accent-color: var(--cyan-dark); }
.opt:has(input:checked) { border-color: var(--cyan-dark); background: var(--cyan-soft); }
.qlist li.right .qtext::before { content: "✓ "; color: var(--green); }
.qlist li.wrong .qtext::before { content: "✗ "; color: var(--red); }
.qlist li p { margin: 2px 0; }
.pager { display: flex; justify-content: space-between; margin-top: 8px; font-weight: 600; }
.exam-submit { position: sticky; bottom: 0; background: var(--white); border-top: 1px solid var(--line); padding: 14px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.big-check { font-size: 3rem; }
.score { font-size: 3rem; font-weight: 800; color: var(--green); margin: 0; }
.review li { margin: 4px 0; }

/* Team */
.add-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
@media (max-width: 860px) { .add-grid { grid-template-columns: 1fr; } }
.team { width: 100%; border-collapse: collapse; min-width: 620px; }
.team th { text-align: left; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.team td { padding: 12px 10px; border-bottom: 1px solid #F1F5F9; vertical-align: top; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.row-actions form { margin: 0; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-size: .9rem; color: var(--cyan-dark); text-decoration: underline; cursor: pointer; }
.linkish.danger { color: var(--red); }
.row-actions a { font-size: .9rem; }

/* Printable documents (record, forms) */
body.doc { background: var(--bg); }
.toolbar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding: 16px; }
.paper { max-width: 8.5in; margin: 0 auto 40px; background: var(--white); padding: 0.6in 0.7in; border-radius: 6px; box-shadow: 0 4px 24px rgba(15, 23, 42, .08); font-size: 14px; }
.paper h1 { font-size: 1.5rem; }
.paper h2 { font-size: 1.05rem; margin-top: 24px; }
.rec { width: 100%; border-collapse: collapse; margin: 12px 0; }
.rec th, .rec td { border: 1px solid #CBD5E1; padding: 8px 10px; text-align: left; vertical-align: top; }
.rec th { width: 38%; background: #F8FAFC; font-weight: 600; }
.rec.types th { width: auto; }
.rec.types td:nth-child(2), .rec.types td:nth-child(4) { white-space: nowrap; }
.sig { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 24px; margin: 40px 0 8px; }
.sig span { border-top: 1.5px solid var(--navy); padding-top: 6px; font-size: .85rem; color: var(--muted); }
.outline { margin: 6px 0; font-size: 13px; }
@media (max-width: 640px) { .paper { padding: 24px 18px; } .sig { grid-template-columns: 1fr; } }
@media print {
    body, body.doc { background: none; }
    .topbar, .foot, .no-print, .toolbar, .player, .quiz, .pager, .crumbs, .card-head .btn, .cheat-print, .unmute, .lesson-h1 { display: none !important; }
    .fold > summary { display: none; }
    .fold-body { border: 0; padding: 0; }
    .paper { box-shadow: none; margin: 0; padding: 0; max-width: none; }
    .lesson-grid { display: block; }
    .card { border: 0; box-shadow: none; padding: 0; }
}

/* Autoplay fallback: shown when the browser started the video muted */
.player { position: relative; }
.unmute { position: absolute; left: 16px; bottom: 64px; z-index: 2; padding: 12px 18px; border: 0; border-radius: 999px; background: #FFFFFF; color: #0F172A; font: 700 1rem Inter, sans-serif; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); cursor: pointer; }
.unmute:focus-visible { outline: 3px solid rgba(6, 182, 212, .6); outline-offset: 2px; }

/* Video-only courses (EPA 608): "Mark lesson complete" under the video */
.complete-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; }
.complete-card p { margin: 0; }
