/* ============================================================
   HEXLABZ ACADEMY — Cyber Training styles (tx-*)
   Matches the hxui index design system:
   white paper, ink black, DM Mono eyebrows, Manrope headings,
   pill buttons, 1px lines, restrained glyph-only accents.
   ============================================================ */

.tx-scope {
    --paper: #ffffff;
    --paper-2: #fafafa;
    --paper-3: #f4f4f5;
    --ink: #0a0a0a;
    --ink-2: #3f3f46;
    --ink-3: #52525b;
    --ink-4: #71717a;
    --line: rgba(10, 10, 10, 0.14);
    --line-soft: rgba(10, 10, 10, 0.07);
    --sans: 'Manrope', system-ui, -apple-system, sans-serif;
    --mono: 'DM Mono', ui-monospace, 'SF Mono', monospace;
    --pill: 50px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --hx-blue: #1d4ed8;
    --hx-cyan: #0e7490;
    --hx-amber: #b45309;
    --hx-red: #b91c1c;
    --hx-green: #047857;
    --hx-violet: #6d28d9;

    font-family: var(--sans);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.65;
}

.tx-scope ::selection { background: var(--ink); color: #ffffff; }

/* ---- layout ---- */
.tx-wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.4rem); }
.tx-sec { padding: clamp(3.2rem, 6.5vw, 5.4rem) 0; }
.tx-sec--tint { background: var(--paper-3); }
.tx-sec--tight { padding: clamp(2rem, 4vw, 3rem) 0; }

/* ---- type ---- */
.tx-eyebrow {
    font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--ink-4); display: inline-flex;
    align-items: center; gap: 0.55rem; margin: 0 0 1rem;
}
.tx-eyebrow::before { content: '//'; color: var(--ink); }
.tx-h1 { font-size: clamp(2.3rem, 4.8vw, 3.7rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; margin: 0; text-wrap: balance; }
.tx-h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.12; letter-spacing: -0.025em; font-weight: 800; margin: 0; text-wrap: balance; }
.tx-h3 { font-size: 1.22rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.tx-sub { color: var(--ink-3); font-size: 1.04rem; max-width: 62ch; margin: 1rem 0 0; }
.tx-mono { font-family: var(--mono); }

/* ---- buttons ---- */
.tx-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
    height: 50px; padding: 0 1.7rem; border-radius: var(--pill);
    background: var(--ink); color: #ffffff; border: 1px solid var(--ink);
    font-weight: 700; font-size: 0.93rem; line-height: 1; text-decoration: none;
    font-family: var(--sans); cursor: pointer;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.tx-btn:hover, .tx-btn:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(10,10,10,.16); color: #ffffff; text-decoration: none; }
.tx-btn:active { transform: translateY(0); }
.tx-btn[disabled] { opacity: .5; pointer-events: none; }
.tx-btn--ghost { background: transparent; color: var(--ink); }
.tx-btn--ghost:hover { background: var(--paper-3); color: var(--ink); box-shadow: none; }
.tx-btn--sm { height: 40px; padding: 0 1.15rem; font-size: 0.85rem; }
.tx-btn--block { width: 100%; }

/* ---- chips / badges ---- */
.tx-chip {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em;
    text-transform: uppercase; padding: 0.32rem 0.75rem; border-radius: var(--pill);
    border: 1px solid var(--line); color: var(--ink-2); background: var(--paper);
    white-space: nowrap;
}
.tx-chip--free { color: var(--hx-green); border-color: rgba(4,120,87,.35); background: rgba(4,120,87,.06); }
.tx-chip--paid { color: var(--ink); border-color: var(--ink); background: var(--ink); color: #fff; }
.tx-chip--enrolled { color: var(--hx-blue); border-color: rgba(29,78,216,.3); background: rgba(29,78,216,.05); }
.tx-chip--passed { color: var(--hx-green); border-color: rgba(4,120,87,.35); background: rgba(4,120,87,.07); }
.tx-chip--warn { color: var(--hx-amber); border-color: rgba(180,83,9,.3); background: rgba(180,83,9,.05); }

/* ---- cards ---- */
.tx-card {
    background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
    padding: 1.6rem; position: relative;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.tx-card--hover:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(10,10,10,.09); border-color: rgba(10,10,10,.28); }
.tx-card--flat { box-shadow: none; }
.tx-card-num {
    position: absolute; top: 1.25rem; right: 1.4rem;
    font-family: var(--mono); font-size: 0.72rem; color: var(--ink-4); letter-spacing: .1em;
}

/* ---- module grid ---- */
.tx-grid { display: grid; gap: 1.1rem; }
.tx-grid--3 { grid-template-columns: repeat(3, 1fr); }
.tx-grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 991px) { .tx-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .tx-grid--3, .tx-grid--2 { grid-template-columns: 1fr; } }

.tx-mod-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1rem; }
.tx-mod-icon {
    width: 46px; height: 46px; border-radius: 14px; flex: 0 0 46px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--paper-3); border: 1px solid var(--line-soft); font-size: 1.05rem;
}
.tx-mod-title { font-size: 1.08rem; font-weight: 800; letter-spacing: -0.01em; margin: 0; line-height: 1.3; }
.tx-mod-desc { color: var(--ink-3); font-size: 0.92rem; margin: 0 0 1.1rem; min-height: 3.1em; }
.tx-mod-meta { display: flex; flex-wrap: wrap; gap: 0.45rem 1rem; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--ink-4); text-transform: uppercase; margin-bottom: 1.1rem; }
.tx-mod-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-top: auto; }
.tx-mod-foot .tx-price { font-weight: 800; font-size: 1.02rem; white-space: nowrap; }
.tx-mod-foot .tx-price small { font-weight: 500; color: var(--ink-4); font-size: 0.72rem; font-family: var(--mono); }

/* ---- progress ---- */
.tx-progress { height: 6px; background: var(--paper-3); border-radius: 99px; overflow: hidden; border: 1px solid var(--line-soft); }
.tx-progress__fill { height: 100%; background: var(--ink); border-radius: 99px; transition: width .5s var(--ease); }
.tx-progress-label { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.68rem; letter-spacing: .08em; color: var(--ink-4); text-transform: uppercase; margin-top: 0.45rem; }

/* ---- steps ---- */
.tx-step { display: flex; gap: 1rem; align-items: flex-start; }
.tx-step-n {
    width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px;
    border: 1px solid var(--ink); display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--mono); font-size: 0.8rem; font-weight: 500;
}

/* ---- lesson layout ---- */
.tx-lesson-grid { display: grid; grid-template-columns: 300px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 900px) { .tx-lesson-grid { grid-template-columns: 1fr; } }
.tx-sidenav { position: sticky; top: 90px; }
@media (max-width: 900px) { .tx-sidenav { position: static; } }
.tx-sidenav-item {
    display: flex; align-items: center; gap: 0.7rem; padding: 0.75rem 0.9rem;
    border: 1px solid var(--line-soft); border-radius: 12px; text-decoration: none;
    color: var(--ink-2); background: var(--paper); margin-bottom: 0.45rem;
    transition: border-color .2s var(--ease), background .2s var(--ease);
}
.tx-sidenav-item:hover { border-color: var(--line); background: var(--paper-2); color: var(--ink); text-decoration: none; }
.tx-sidenav-item.is-active { border-color: var(--ink); color: var(--ink); background: var(--paper); font-weight: 700; }
.tx-sidenav-n { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-4); flex: 0 0 auto; }
.tx-sidenav-t { font-size: 0.86rem; line-height: 1.35; flex: 1 1 auto; }
.tx-sidenav-check { color: var(--hx-green); flex: 0 0 auto; font-size: 0.8rem; }
.tx-sidenav-lock { color: var(--ink-4); flex: 0 0 auto; font-size: 0.78rem; }

/* ---- lesson body typography ---- */
.tx-lesson-body { font-size: 1.0rem; color: var(--ink-2); }
.tx-lesson-body h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); margin: 2rem 0 0.7rem; }
.tx-lesson-body h3 { font-size: 1.08rem; font-weight: 800; color: var(--ink); margin: 1.6rem 0 0.55rem; }
.tx-lesson-body p { margin: 0 0 1rem; }
.tx-lesson-body ul, .tx-lesson-body ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.tx-lesson-body li { margin-bottom: 0.45rem; }
.tx-lesson-body strong { color: var(--ink); }
.tx-lesson-body code {
    font-family: var(--mono); font-size: 0.85em; background: var(--paper-3);
    border: 1px solid var(--line-soft); border-radius: 6px; padding: 0.08em 0.4em; color: var(--ink);
}
.tx-lesson-body pre {
    background: var(--ink); color: #e4e4e7; border-radius: 12px; padding: 1rem 1.2rem;
    overflow-x: auto; font-size: 0.82rem; margin: 0 0 1.2rem;
}
.tx-lesson-body pre code { background: transparent; border: 0; color: inherit; padding: 0; }
.tx-keybox {
    border: 1px solid var(--line); border-left: 3px solid var(--ink); border-radius: 12px;
    background: var(--paper-2); padding: 1rem 1.2rem; margin: 1.4rem 0;
}
.tx-keybox .tx-keybox-label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-4); display: block; margin-bottom: 0.4rem; }
.tx-lesson-body table { width: 100%; border-collapse: collapse; margin: 0 0 1.2rem; font-size: 0.92rem; }
.tx-lesson-body th, .tx-lesson-body td { border: 1px solid var(--line-soft); padding: 0.55rem 0.8rem; text-align: left; }
.tx-lesson-body th { background: var(--paper-3); font-weight: 700; color: var(--ink); }

/* ---- exam ---- */
.tx-exam-q { border: 1px solid var(--line); border-radius: 16px; padding: 1.4rem 1.5rem; margin-bottom: 1.1rem; background: var(--paper); }
.tx-exam-q-num { font-family: var(--mono); font-size: 0.72rem; letter-spacing: .12em; color: var(--ink-4); text-transform: uppercase; margin-bottom: 0.5rem; }
.tx-exam-q-text { font-weight: 700; font-size: 1.02rem; margin: 0 0 1rem; color: var(--ink); }
.tx-opt {
    display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.8rem 1rem;
    border: 1px solid var(--line-soft); border-radius: 12px; cursor: pointer; margin-bottom: 0.55rem;
    transition: border-color .2s var(--ease), background .2s var(--ease);
}
.tx-opt:hover { border-color: var(--line); background: var(--paper-2); }
.tx-opt input[type="radio"] { accent-color: var(--ink); margin-top: 0.25rem; }
.tx-opt.is-picked { border-color: var(--ink); background: var(--paper-2); }
.tx-opt.is-correct { border-color: rgba(4,120,87,.5); background: rgba(4,120,87,.05); }
.tx-opt.is-wrong { border-color: rgba(185,28,28,.4); background: rgba(185,28,28,.04); }
.tx-why {
    border-left: 3px solid var(--ink); background: var(--paper-2); border-radius: 0 10px 10px 0;
    padding: 0.6rem 0.9rem; font-size: 0.88rem; color: var(--ink-3); margin-top: 0.2rem;
}
.tx-score-band {
    border: 1px solid var(--line); border-radius: 18px; padding: 1.6rem;
    display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: center; justify-content: space-between;
    background: var(--paper); margin-bottom: 1.4rem;
}
.tx-score-big { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.tx-score-big small { font-size: 1rem; color: var(--ink-4); font-weight: 500; }

/* ---- certificate ---- */
.tx-cert {
    max-width: 860px; margin: 0 auto; background: #ffffff; border: 1px solid var(--line);
    border-radius: 18px; padding: clamp(1.6rem, 4vw, 3.2rem); position: relative; overflow: hidden;
}
.tx-cert::before {
    content: ''; position: absolute; inset: 10px; border: 1px solid var(--line-soft);
    border-radius: 12px; pointer-events: none;
}
.tx-cert-issuer { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-4); }
.tx-cert-name { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; margin: 1rem 0 0.2rem; }
.tx-cert-line { width: 72px; height: 2px; background: var(--ink); margin: 1.2rem auto; }
.tx-cert-code { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.1em; color: var(--ink-4); }

/* ---- misc ---- */
.tx-stat { text-align: left; }
.tx-stat b { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.tx-stat span { font-family: var(--mono); font-size: 0.68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); }
.tx-flash { border: 1px solid var(--line); border-radius: 14px; padding: 0.9rem 1.2rem; margin-bottom: 1.2rem; font-size: 0.94rem; }
.tx-flash--ok { border-color: rgba(4,120,87,.4); background: rgba(4,120,87,.05); color: #065f46; }
.tx-flash--err { border-color: rgba(185,28,28,.4); background: rgba(185,28,28,.04); color: #991b1b; }
.tx-flash--info { border-color: rgba(29,78,216,.3); background: rgba(29,78,216,.04); color: #1e40af; }
.tx-divider { height: 1px; background: var(--line-soft); border: 0; margin: 0; }
.tx-muted { color: var(--ink-4); }
.tx-small { font-size: 0.85rem; }
.tx-note { font-family: var(--mono); font-size: 0.72rem; letter-spacing: .06em; color: var(--ink-4); }
.tx-faq { border: 1px solid var(--line-soft); border-radius: 14px; padding: 1rem 1.3rem; margin-bottom: 0.7rem; background: var(--paper); }
.tx-faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.tx-faq summary::after { content: '+'; font-family: var(--mono); color: var(--ink-4); }
.tx-faq[open] summary::after { content: '–'; }
.tx-faq p { color: var(--ink-3); margin: 0.8rem 0 0; font-size: 0.94rem; }
.tx-lock-note { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--mono); font-size: 0.7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); }
.tx-pagebar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.6rem; flex-wrap: wrap; }

@media print {
    #hexlabzNavbar, .footer, #backToTop, .vora-widget, .tx-noprint { display: none !important; }
    .tx-cert { border: none; }
    body { background: #fff; }
}

/* ============================================================
   TX5 UPGRADE (fresh5) - Udemy-style lesson & module styling
   ============================================================ */

/* ---- video player (lesson hero) ---- */
.tx5-player {
    border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
    background: var(--paper-3);
}
.tx5-player__frame {
    position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0a0a0a;
}
.tx5-player__frame iframe {
    position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
}
.tx5-player__meta {
    padding: .7rem 1rem; border-top: 1px solid var(--line-soft);
    font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; color: var(--ink-3);
}
.tx5-player__meta i { color: var(--hx-red); margin-right: .35rem; }

/* ---- inline illustration figures ---- */
.tx5-fig {
    margin: 1.6rem auto; max-width: 660px; text-align: center;
    border: 1px solid var(--line-soft); border-radius: 14px;
    background: var(--paper-2); padding: 1rem 1rem .6rem;
}
.tx5-fig__art svg { width: 100%; height: auto; display: block; margin: 0 auto; max-width: 560px; }
.tx5-fig__cap {
    margin-top: .4rem; font-family: var(--mono); font-size: .7rem;
    letter-spacing: .05em; color: var(--ink-4);
}

/* ---- key takeaways callout ---- */
.tx5-take {
    margin: 1.8rem 0 .4rem; padding: 1.15rem 1.35rem;
    border: 1px solid rgba(4,120,87,.25); border-left: 4px solid var(--hx-green);
    border-radius: 12px; background: rgba(4,120,87,.05);
}
.tx5-take h3 { margin: 0 0 .5rem; font-size: 1rem; letter-spacing: -.01em; }
.tx5-take ul { margin: 0; padding-left: 1.15rem; }
.tx5-take li { margin: .3rem 0; font-size: .96rem; color: var(--ink-2); }
.tx5-take li::marker { color: var(--hx-green); }

/* ---- module: what you'll learn (outcomes) ---- */
.tx5-outcomes__list {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: .55rem 1.6rem;
}
.tx5-outcomes__list li {
    display: flex; align-items: flex-start; gap: .6rem;
    font-size: .97rem; color: var(--ink-2); line-height: 1.5;
}
.tx5-outcomes__list li i { color: var(--hx-green); flex: 0 0 auto; margin-top: .22rem; font-size: .85rem; }

/* ---- module: who this course is for ---- */
.tx5-aud .tx-card { border-color: rgba(29,78,216,.25); background: rgba(29,78,216,.03); }
.tx5-aud .fa-user-check { color: var(--hx-blue); }

/* ---- level chips ---- */
.tx5-lvl--foundation { color: var(--hx-blue); border-color: rgba(29,78,216,.32); background: rgba(29,78,216,.05); }
.tx5-lvl--core { color: var(--hx-violet); border-color: rgba(109,40,217,.32); background: rgba(109,40,217,.05); }
.tx5-lvl--specialist { color: var(--hx-amber); border-color: rgba(180,83,9,.32); background: rgba(180,83,9,.06); }

/* ---- lesson sidebar duration ---- */
.tx-sidenav-m { font-size: .72rem; font-weight: 500; color: var(--ink-4); }

/* ---- tx5i illustration primitives (shared palette) ---- */
.tx5i-ln, .tx5i-lnt, .tx5i-gln, .tx5i-aln, .tx5i-rln, .tx5i-wln, .tx5i-dash {
    fill: none; stroke-linecap: round; stroke-linejoin: round;
}
.tx5i-ln  { stroke: var(--ink);   stroke-width: 3; }
.tx5i-lnt { stroke: var(--ink-2); stroke-width: 1.8; }
.tx5i-gln { stroke: var(--hx-green); stroke-width: 3; }
.tx5i-aln { stroke: var(--hx-amber); stroke-width: 3; }
.tx5i-rln { stroke: var(--hx-red);   stroke-width: 3; }
.tx5i-wln { stroke: #ffffff;         stroke-width: 3; }
.tx5i-dash { stroke-dasharray: 6 5; }

.tx5i-fp { fill: #ffffff; stroke: none; }
.tx5i-fw { fill: #ffffff; stroke: none; }
.tx5i-fk { fill: var(--ink);   stroke: none; }
.tx5i-fb { fill: rgba(29,78,216,.14);  stroke: none; }
.tx5i-fg { fill: rgba(4,120,87,.16);   stroke: none; }
.tx5i-fa { fill: rgba(180,83,9,.16);   stroke: none; }
.tx5i-fr { fill: rgba(185,28,28,.14);  stroke: none; }
.tx5i-fv { fill: rgba(109,40,217,.14); stroke: none; }

.tx5i-t, .tx5i-tb, .tx5i-tk, .tx5i-ts, .tx5i-tw {
    font-family: var(--mono); stroke: none;
}
.tx5i-t, .tx5i-tk { fill: var(--ink); font-size: 10px; }
.tx5i-tb { fill: var(--hx-blue); font-size: 10px; }
.tx5i-ts { fill: var(--ink-3); font-size: 8px; }
.tx5i-tw { fill: #ffffff; font-size: 10px; }
