/* ============================================================
   ThreatTree Academy (/academy/ and its lessons).
   Generated pages from build-academy.py; body is "kb ac", so the
   layout, hero, path map, level sections, side rail and phone bar
   all come from kb.css (the knowledge base look). This file only
   adds what the Academy has and the knowledge base doesn't: plan
   pills, steps with screenshots, clips, practice, quiz, progress.
   ============================================================ */

.ac {
  --ac-muted: var(--text-muted);
  --ac-tint: #FEF2F2;
  --ac-tint-border: #FECACA;
  --ac-ok: #15803D;
  --ac-ok-bg: #F0FDF4;
  --ac-ok-border: #BBF7D0;
  --ac-bad: #B91C1C;
  --ac-bad-bg: #FEF2F2;
  --ac-tip-bg: #EFF6FF;
  --ac-tip-border: #BFDBFE;
  --ac-pill-free-bg: #DCFCE7; --ac-pill-free: #14532D;
  --ac-pill-pro-bg: #FEE2E2;  --ac-pill-pro: #991B1B;
  --ac-pill-ent-bg: #0F172A;  --ac-pill-ent: #F8FAFC;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ac {
    --ac-muted: #CBD5E1;
    --ac-tint: rgba(248,113,113,.10); --ac-tint-border: rgba(248,113,113,.32);
    --ac-ok: #86EFAC; --ac-ok-bg: rgba(34,197,94,.12); --ac-ok-border: rgba(34,197,94,.35);
    --ac-bad: #FCA5A5; --ac-bad-bg: rgba(248,113,113,.12);
    --ac-tip-bg: rgba(59,130,246,.12); --ac-tip-border: rgba(96,165,250,.35);
    --ac-pill-free-bg: rgba(34,197,94,.18); --ac-pill-free: #BBF7D0;
    --ac-pill-pro-bg: rgba(248,113,113,.2); --ac-pill-pro: #FECACA;
    --ac-pill-ent-bg: #F8FAFC; --ac-pill-ent: #0F172A;
  }
}
:root[data-theme="dark"] .ac {
  --ac-muted: #CBD5E1;
  --ac-tint: rgba(248,113,113,.10); --ac-tint-border: rgba(248,113,113,.32);
  --ac-ok: #86EFAC; --ac-ok-bg: rgba(34,197,94,.12); --ac-ok-border: rgba(34,197,94,.35);
  --ac-bad: #FCA5A5; --ac-bad-bg: rgba(248,113,113,.12);
  --ac-tip-bg: rgba(59,130,246,.12); --ac-tip-border: rgba(96,165,250,.35);
  --ac-pill-free-bg: rgba(34,197,94,.18); --ac-pill-free: #BBF7D0;
  --ac-pill-pro-bg: rgba(248,113,113,.2); --ac-pill-pro: #FECACA;
  --ac-pill-ent-bg: #F8FAFC; --ac-pill-ent: #0F172A;
}

.ac .ac-mono, .ac .ac-label { font-family: var(--kb-mono); }

.ac .ac-pill { display: inline-block; font-size: .6875rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; padding: .2rem .6rem; border-radius: 999px; vertical-align: middle; }
.ac .ac-pill--free { background: var(--ac-pill-free-bg); color: var(--ac-pill-free); }
.ac .ac-pill--pro { background: var(--ac-pill-pro-bg); color: var(--ac-pill-pro); }
.ac .ac-pill--ent { background: var(--ac-pill-ent-bg); color: var(--ac-pill-ent); }

/* ---------- Lesson page ---------- */
.ac .ac-hero__sum { max-width: 720px; margin: 0 0 1rem; font-size: 1.125rem; line-height: 1.65; color: var(--text); }
.ac .ac-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; }
.ac .ac-done-badge { color: var(--ac-ok); font-weight: 700; }

/* "In this lesson you will learn" uses the knowledge base's definition box. */
.ac .ac-learn h2.kb-def__label { margin: 0 0 .6rem; }
.ac .ac-learn ul { list-style: none; margin: 0; padding: 0; }
.ac .ac-learn li { position: relative; padding-left: 1.6rem; margin: .3rem 0; font-size: 1.0625rem; line-height: 1.6; color: var(--text); }
.ac .ac-learn li::before { content: ""; position: absolute; left: .15rem; top: .5em; width: .65rem; height: .35rem;
  border-left: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(-45deg); }

/* Small mono eyebrow over a section heading, as on the knowledge base. */
.ac .ac-label, .ac .ac-practice .ac-label { margin: 0 0 .35rem; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red-text); }
.ac .ac-practice .ac-label { color: var(--kb-tint-text); }

.ac .ac-body h2 { scroll-margin-top: 5.5rem; }
.ac .ac-body h2 { font-size: 1.5rem; font-weight: 750; letter-spacing: -.02em; margin: 2.5rem 0 .75rem; }
.ac .ac-body p { font-size: 1.0625rem; line-height: 1.75; color: var(--text); margin: 0 0 1rem; }
.ac .ac-body kbd { font: 600 .8125rem/1 ui-monospace, Menlo, Consolas, monospace; padding: .15rem .4rem;
  border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); }

/* Numbered steps: a counter in a red disc, a thin rail joining them. */
.ac .ac-steps { list-style: none; counter-reset: acstep; margin: 1.25rem 0 0; padding: 0; }
.ac .ac-steps > li { counter-increment: acstep; position: relative; padding: 0 0 1.75rem 3.25rem; }
.ac .ac-steps > li::before { content: counter(acstep); position: absolute; left: 0; top: -.1rem; width: 2.1rem; height: 2.1rem;
  border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; font-size: .9375rem;
  display: grid; place-items: center; }
.ac .ac-steps > li::after { content: ''; position: absolute; left: 1.03rem; top: 2.3rem; bottom: .3rem; width: 2px;
  background: var(--border); }
.ac .ac-steps > li:last-child::after { display: none; }
.ac .ac-steps h3 { font-size: 1.1875rem; font-weight: 700; margin: 0 0 .5rem; line-height: 1.35; }
.ac .ac-steps > li { scroll-margin-top: 6rem; }

/* Screenshots: the full app window, always the same size, in a browser frame whose address
   bar shows the page's real path. Inside a step they use the step's indent too, so each one
   spans the whole lesson column. */
.ac .ac-shot { margin: 1.25rem 0 .5rem; }
.ac .ac-steps .ac-shot { margin-left: -3.25rem; position: relative; z-index: 1; background: var(--bg); }
.ac .ac-shot__zoom { display: block; border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow-md); background: var(--surface); cursor: zoom-in; text-decoration: none; }
.ac .ac-shot__bar { display: flex; align-items: center; gap: .75rem; padding: .5rem .75rem;
  background: var(--muted-bg); border-bottom: 1px solid var(--border); }
.ac .ac-shot__dots { display: inline-flex; gap: .35rem; flex: none; }
.ac .ac-shot__dots i { width: .6rem; height: .6rem; border-radius: 50%; background: var(--border); }
.ac .ac-shot__url { flex: 1; min-width: 0; max-width: 26rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 500 .75rem/1.6 ui-monospace, Menlo, Consolas, monospace; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: .05rem .6rem; }
@media (max-width: 600px) {
  .ac .ac-shot__bar { padding: .4rem .5rem; gap: .5rem; }
}
.ac .ac-shot img { display: block; width: 100%; height: auto; }
.ac .ac-shot figcaption { font-size: .9375rem; line-height: 1.55; color: var(--text); margin-top: .65rem; }

.ac .ac-tip { margin: 1.5rem 0 0; padding: 1rem 1.25rem; border: 1px solid var(--ac-tip-border); border-radius: 12px;
  background: var(--ac-tip-bg); }
.ac .ac-tip p { margin: 0; font-size: 1rem; line-height: 1.65; }

.ac .ac-practice { margin: 3rem 0 0; padding: 1.5rem 1.75rem; border-radius: .75rem; border: 1px solid var(--kb-tint-border);
  background: var(--kb-tint); }
.ac .ac-practice h2 { font-size: 1.375rem; font-weight: 750; margin: 0 0 .5rem; }
.ac .ac-practice p { font-size: 1.0625rem; line-height: 1.65; margin: 0 0 1rem; color: var(--text); }
.ac .ac-practice .ac-practice__plan { font-size: .9375rem; }
.ac .ac-practice__plan a { color: var(--kb-tint-text); font-weight: 600; }

/* ---------- Quiz ---------- */
.ac .ac-quiz { margin: 3rem 0 0; }
.ac .ac-quiz h2 { font-size: 1.375rem; font-weight: 750; margin: 0 0 .35rem; }
.ac .ac-quiz__intro { color: var(--ac-muted); margin: 0 0 1.25rem; font-size: .9375rem; }
.ac .ac-q { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 1.1rem 1.25rem;
  margin: 0 0 1rem; min-width: 0; }
.ac .ac-q legend { font-weight: 700; font-size: 1.0625rem; line-height: 1.45; padding: 0; float: left; width: 100%;
  margin-bottom: .75rem; }
.ac .ac-q__num { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--muted-bg); font-size: .8125rem; margin-right: .35rem; }
.ac .ac-q__opt { clear: both; display: flex; gap: .65rem; align-items: flex-start; padding: .6rem .75rem; margin: .35rem 0;
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer; line-height: 1.45; font-size: 1rem; }
.ac .ac-q__opt:hover { border-color: var(--red); }
.ac .ac-q__opt input { margin-top: .2rem; accent-color: var(--red); flex: none; }
.ac .ac-q__opt.is-right { border-color: var(--ac-ok-border); background: var(--ac-ok-bg); }
.ac .ac-q__opt.is-wrong { border-color: var(--kb-tint-border); background: var(--ac-bad-bg); }
.ac .ac-q__why { margin: .75rem 0 0; font-size: .9375rem; line-height: 1.6; }
.ac .ac-q.is-right .ac-q__why::before { content: 'Correct. '; font-weight: 700; color: var(--ac-ok); }
.ac .ac-q.is-wrong .ac-q__why::before { content: 'Not quite. '; font-weight: 700; color: var(--ac-bad); }
.ac .ac-quiz__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 1rem; }
.ac .ac-quiz__result { margin: 0; font-weight: 600; }
.ac .ac-quiz__result.is-pass { color: var(--ac-ok); }

.ac .ac-pathnav { margin-top: 3rem; }


/* Track list in the side rail: kb-levellist plus a tick for finished lessons. */
.ac .ac-lessonlist li a.is-done::before { content: "\2713"; color: var(--ac-ok); font-weight: 700; }

/* ---------- Hub ---------- */
.ac-hub .ac-hubhero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin: 0; }
.ac-hub .ac-hubhero__link { font-weight: 600; color: var(--red-text); text-decoration: none; font-size: .9375rem; }
.ac-hub .ac-hubhero__link:hover { text-decoration: underline; }
.ac-hub .ac-map__plan { font-weight: 700; }
.ac-hub .ac-map__plan--free { color: var(--ac-ok); }
.ac-hub .ac-map__plan--pro, .ac-hub .ac-map__plan--ent { color: var(--red-text); }
.ac-hub .kb-levelsec__num { display: flex; align-items: center; gap: .6rem; }
.ac-hub .kb-levelsec__num .ac-pill { font-family: inherit; letter-spacing: .06em; }
.ac-hub .kb-levelsec__aud { display: flex; flex-wrap: wrap; gap: .1rem .4rem; }
.ac-hub .kb-levelsec__aud > span { white-space: nowrap; }

.ac-hub .ac-track__progress { display: flex; align-items: center; gap: .75rem; margin: 1rem 0 0; font-family: var(--kb-mono);
  font-size: .75rem; color: var(--ac-muted); }
.ac-hub .ac-track__bar { flex: none; width: 140px; height: 6px; border-radius: 99px; background: var(--kb-track); overflow: hidden; display: inline-block; }
.ac-hub .ac-track__bar span { display: block; height: 100%; width: 0; background: var(--ac-ok); transition: width .3s; }

/* Finished lessons: a green station with a tick in place of the number. */
.ac-hub .kb-step__link.is-done .kb-step__num { background: var(--ac-ok); border-color: var(--ac-ok); color: transparent; }
.ac-hub .kb-step__link.is-done .kb-step__num::after { content: "\2713"; position: absolute; color: #fff; font-size: .9375rem; }
.ac-hub .ac-card__done { color: var(--ac-ok); font-weight: 700; }
.ac-hub .faq-item summary h3 { display: inline; font-size: inherit; font-weight: inherit; margin: 0; }

@media (max-width: 979px) {
  .ac-hub .ac-track__progress { margin-top: .6rem; }
}
@media (max-width: 600px) {
  .ac .ac-steps > li { padding-left: 2.75rem; }
  .ac .ac-steps .ac-shot { margin-left: -2.75rem; }
  .ac .ac-practice { padding: 1.25rem 1.1rem; }
  .ac .ac-hero__sum { font-size: 1.0625rem; }
}

/* ---------- Silent clips (poster + Play) ---------- */
.ac .ac-clip { margin: 1.25rem 0 1.75rem; }
.ac .ac-clip__frame { position: relative; border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow-md); background: var(--surface); }
.ac .ac-clip__img { display: block; width: 100%; height: auto; cursor: pointer; }
.ac .ac-clip__btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex;
  align-items: center; gap: .6rem; padding: .8rem 1.3rem; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(15, 23, 42, .88); color: #fff; font: 700 1rem/1 inherit; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.ac .ac-clip__btn:hover, .ac .ac-clip__btn:focus-visible { background: var(--red); outline: none; }
.ac .ac-clip__icon { width: 0; height: 0; border-left: 13px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.ac .ac-clip.is-playing .ac-clip__btn { top: auto; bottom: 12px; left: auto; right: 12px; transform: none; padding: .55rem .95rem; font-size: .875rem; }
.ac .ac-clip.is-playing .ac-clip__icon { width: 10px; height: 12px; border: 0; border-left: 3px solid #fff; border-right: 3px solid #fff; }
.ac .ac-clip figcaption { font-size: .9375rem; line-height: 1.55; color: var(--ac-muted); margin-top: .65rem; }
.ac .ac-clip figcaption strong { color: var(--text); }
