/* Education lessons — THE SUITE theme (aligned 2026-10-15 to site/suite.css).
   Cards white on paper #FAFAF8, ink #14181D; chart/payoff panels stay dark
   #131722 (lesson graphics); suite blue #2F6FED; amber #E8A33D callouts and
   green #089981 / red #F23645 keep their chart-graphic meaning (legend,
   payoff panel, how-this-loses box). CSP-safe: no inline styles. */
#edu-lessons { padding: 4px 0 8px; }
.ln-head { margin-top: 38px; }
.ln-head h2 {
  margin: 0 0 8px; font-size: 1.28rem; letter-spacing: .05em;
  border-bottom: 2px solid #E7E5E0; padding-bottom: 8px;
}
.ln-head p { max-width: 46em; }
.ln-legend {
  font-family: var(--mono, ui-monospace, monospace); font-size: .74rem; font-weight: 700;
  letter-spacing: .05em; color: #5A6068; margin: 12px 0 4px;
}
.lg-amber { color: #E8A33D; } .lg-green { color: #089981; }
.lg-red { color: #F23645; } .lg-blue { color: #2F6FED; }
.ln-tools { margin: 10px 0 14px; }
#ln-search {
  width: 100%; max-width: 520px; padding: 11px 14px; font-size: 1rem; color: #14181D;
  background: #fff; border: 1px solid #DDDAD3; border-radius: 10px;
}
#ln-search:focus { outline: 2px solid #2F6FED; outline-offset: 1px; border-color: #2F6FED; }
#ln-noresults { color: #5A6068; }

/* ---------- lesson cards ---------- */
.ln-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px;
}
.ln-card {
  font: inherit; text-align: left; cursor: pointer; color: #14181D;
  background: #fff; border: 1px solid #E7E5E0; border-radius: 16px;
  padding: 0 0 14px; overflow: hidden; position: relative;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 1px 3px rgba(20, 24, 29, .05);
}
.ln-card:hover, .ln-card:focus-visible { border-color: #2F6FED; }
.ln-card .ln-thumb { display: block; background: #131722; padding: 8px; }
.ln-card .ln-thumb img { display: block; width: 100%; border-radius: 5px; }
.ln-t { font-weight: 800; font-size: 1.04rem; padding: 6px 16px 0; line-height: 1.3; }
.ln-sub { font-size: .94rem; line-height: 1.55; color: #4A4F57; padding: 0 16px; }
.ln-meta {
  font-family: var(--mono, ui-monospace, monospace); font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; color: #5A6068; padding: 2px 16px 0; text-transform: uppercase;
}
.ln-done-chip {
  position: absolute; top: 14px; right: 14px; background: #14181D; color: #FAFAF8;
  font-family: var(--mono, ui-monospace, monospace); font-size: .68rem; font-weight: 700;
  letter-spacing: .08em; padding: 4px 8px; border-radius: 99px;
}
.ln-card.ln-done { border-color: #14181D; }

/* ---------- expanded lesson (reading column ~720px) ---------- */
#ln-lesson { max-width: 740px; margin: 6px auto 0; }
.ln-back {
  font: 700 .9rem/1 inherit; cursor: pointer; color: #2F6FED;
  background: none; border: none; padding: 6px 0;
}
.ln-ltitle { font-size: clamp(1.45rem, 3.4vw, 1.9rem); line-height: 1.2; margin: 6px 0 8px; }
.ln-lmeta {
  font-family: var(--mono, ui-monospace, monospace); font-size: .74rem; font-weight: 700;
  letter-spacing: .05em; color: #5A6068; text-transform: uppercase; line-height: 1.7;
}
.ln-tldr {
  background: #EDF2FE; border-left: 4px solid #2F6FED; border-radius: 8px;
  padding: 14px 18px 12px; margin: 16px 0;
}
.ln-tldr-tag {
  font-family: var(--mono, ui-monospace, monospace); font-size: .72rem; font-weight: 800;
  letter-spacing: .18em; color: #2F6FED;
}
.ln-tldr ul { margin: 8px 0 4px; padding-left: 20px; }
.ln-tldr li { line-height: 1.6; margin: 4px 0; }
.ln-analogy { font-size: 1.08em; line-height: 1.68; color: #2B2F36; }
.ln-h {
  font-size: .86rem; letter-spacing: .14em; color: #14181D; margin: 26px 0 10px;
  border-bottom: 2px solid #E7E5E0; padding-bottom: 6px;
}

/* dark chart panel */
.ln-chart { margin: 16px 0; }
.ln-zoom {
  position: relative; display: block; width: 100%; padding: 10px; cursor: zoom-in;
  background: #131722; border: 1px solid #2A2E39; border-radius: 10px; font: inherit;
}
.ln-zoom img { display: block; width: 100%; border-radius: 5px; }
.ln-imglabel {
  position: absolute; left: 16px; bottom: 16px; background: rgba(10, 12, 16, .82);
  color: #F5F2EA; border: 1px solid #E8A33D; border-radius: 6px; padding: 4px 9px;
  font-family: var(--mono, ui-monospace, monospace); font-size: .68rem; font-weight: 700;
  letter-spacing: .07em;
}
.ln-cap { font-size: .85rem; color: #5A6068; margin-top: 8px; }

.ln-take, .ln-mistakes { padding-left: 22px; margin: 8px 0; }
.ln-take li, .ln-mistakes li, .ln-steps li { line-height: 1.65; margin: 7px 0; }
.ln-mistakes { list-style: none; padding-left: 2px; }
.ln-mistakes li::before { content: "\2715\00a0\00a0"; color: #E8A33D; font-weight: 800; }
.ln-steps { padding-left: 22px; margin: 8px 0; }

/* rule: signature dark panel */
.ln-rule {
  background: #131722; border-radius: 10px; padding: 16px 18px; margin: 18px 0;
}
.ln-rule-tag {
  font-family: var(--mono, ui-monospace, monospace); font-size: .7rem; font-weight: 800;
  letter-spacing: .2em; color: #E8A33D;
}
.ln-rule-text { color: #E6E8EB; font-weight: 700; font-size: 1.06em; line-height: 1.55; margin-top: 6px; }

/* losing variant */
.ln-lose {
  background: #FDF1F2; border-left: 4px solid #F23645; border-radius: 8px;
  padding: 13px 18px; margin: 14px 0;
}
.ln-lose-tag {
  font-family: var(--mono, ui-monospace, monospace); font-size: .7rem; font-weight: 800;
  letter-spacing: .18em; color: #C22633;
}
.ln-lose p { margin: 6px 0 2px; line-height: 1.65; }

/* payoff + effects */
.ln-payoff { background: #131722; border-radius: 10px; padding: 14px 12px 10px; }
.ln-payoff svg { display: block; width: 100%; height: auto; }
.ln-paycap { color: #C9CDD4; font-size: .86rem; line-height: 1.55; padding: 8px 6px 4px; }
.ln-fxtext {
  background: #fff; border: 1px solid #E7E5E0; border-radius: 8px;
  padding: 13px 18px; line-height: 1.65;
}

/* quiz */
.ln-q {
  background: #fff; border: 1px solid #E7E5E0; border-radius: 14px;
  padding: 14px 16px; margin: 10px 0;
}
.ln-qtext { margin: 0 0 10px; line-height: 1.6; }
.ln-qopts { display: flex; flex-direction: column; gap: 8px; }
.ln-qopt {
  font: 600 .96rem/1.35 inherit; text-align: left; cursor: pointer; color: #14181D;
  background: #FAFAF8; border: 1px solid #DDDAD3; border-radius: 8px; padding: 10px 13px;
}
.ln-qopt:hover:not(:disabled) { border-color: #2F6FED; }
.ln-qopt:disabled { cursor: default; opacity: .75; }
.ln-qopt.q-ok {
  border-color: #2F6FED; background: #EDF2FE; opacity: 1; font-weight: 800;
}
.ln-qopt.q-ok::before { content: "\2713\00a0"; color: #2F6FED; }
.ln-qopt.q-no { border-color: #DDDAD3; color: #5A6068; text-decoration: line-through; }
.ln-qwhy {
  margin: 10px 0 2px; background: #EDF2FE; border-radius: 7px;
  padding: 9px 12px; line-height: 1.55; font-size: .95rem;
}

.ln-practice {
  background: #fff; border: 1px dashed #2F6FED; border-radius: 10px;
  padding: 14px 18px; line-height: 1.65;
}

/* stage decision box (Stage 0 gate / exit ramp) — signature dark panel */
.ln-dec {
  background: #131722; border-radius: 10px; padding: 16px 18px; margin: 18px 0 4px;
}
.ln-dec-tag {
  font-family: var(--mono, ui-monospace, monospace); font-size: .7rem; font-weight: 800;
  letter-spacing: .2em; color: #E8A33D;
}
.ln-dec-intro { color: #C9CDD4; line-height: 1.6; margin: 8px 0 4px; }
.ln-dec-opts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.ln-dec-done { color: #E6E8EB; line-height: 1.65; margin: 10px 0 4px; font-weight: 600; }
.ln-dec-when { color: #9AA4B2; font-size: .85rem; margin: 4px 0 12px; }
.ln-dlrow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.ln-complete-done { background: #14181D !important; border-color: #14181D !important; color: #FAFAF8 !important; }
.ln-navrow { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.ln-navbtn {
  font: 700 .9rem/1.35 inherit; cursor: pointer; color: #2F6FED;
  background: #fff; border: 1px solid #DDDAD3; border-radius: 16px; padding: 10px 14px;
  max-width: 48%; text-align: left;
}
.ln-navbtn:hover { border-color: #2F6FED; }
.ln-next { margin-left: auto; text-align: right; }
.ln-note { font-size: .82rem; color: #5A6068; margin: 16px 0 4px; }

/* ---------- in-place glossary ---------- */
.gloss {
  border-bottom: 2px dotted #2F6FED; cursor: help; position: relative; font-weight: 600;
}
.gloss:hover::after, .gloss:focus::after {
  content: attr(data-def); position: absolute; left: 0; bottom: calc(100% + 8px);
  width: min(250px, 72vw); z-index: 40; white-space: normal;
  background: #14181D; color: #FAFAF8; border-radius: 8px; padding: 9px 11px;
  font-size: .82rem; font-weight: 400; line-height: 1.5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}

/* ---------- lightbox ---------- */
.ln-lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(8, 10, 14, .96);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out; padding: 18px;
}
.ln-lightbox img { max-width: 100%; max-height: 92vh; border-radius: 8px; }
.ln-lbhint {
  position: fixed; bottom: 14px; left: 0; right: 0; text-align: center;
  color: #C9CDD4; font-family: var(--mono, ui-monospace, monospace); font-size: .75rem;
  letter-spacing: .1em;
}

/* ---------- 2026-10-21 redesign: grouped library + lesson pages ----------
   The library groups cards by stage; every lesson is its own page at
   /education/<id>/ with breadcrumb, prev/next and a stage-mates list.
   Cards and course steps are real links now (they were JS-driven before). */
a.ln-card { text-decoration: none; }
.ln-group { margin-top: 30px; }
.ln-group-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  border-bottom: 2px solid #E7E5E0; padding-bottom: 7px; margin-bottom: 14px;
}
.ln-group-head h3 { margin: 0; font-size: 1.08rem; }
.ln-group-count {
  margin-left: auto; font-family: var(--mono, ui-monospace, monospace);
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; color: #5A6068;
}
.edu-steps li { padding: 0; overflow: hidden; }
.edu-steps li > a {
  display: flex; align-items: center; gap: 12px; width: 100%;
  box-sizing: border-box; padding: 12px 14px;
  text-decoration: none; color: inherit;
}

.lp-crumbs {
  font-family: var(--mono, ui-monospace, monospace); font-size: .74rem;
  font-weight: 700; letter-spacing: .05em; color: #5A6068;
  text-transform: uppercase; margin: 2px 0 8px; line-height: 1.7;
}
.lp-crumbs a { color: #2F6FED; text-decoration: none; }
.lp-crumbs a:hover { text-decoration: underline; }
a.ln-back { display: inline-block; text-decoration: none; }
a.ln-back:hover { text-decoration: underline; }
a.ln-navbtn { display: block; text-decoration: none; box-sizing: border-box; }
.ln-navbtn-off {
  color: #5A6068; background: #FAFAF8; cursor: default; text-align: left;
}
.ln-navbtn-off:hover { border-color: #DDDAD3; }

.lp-mates { margin-top: 34px; }
.lp-mates-list {
  list-style: none; margin: 10px 0 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
@media (max-width: 700px) { .lp-mates-list { grid-template-columns: 1fr; } }
.lp-mate {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid #E7E5E0; border-radius: 12px;
  padding: 9px 12px; text-decoration: none; color: #14181D;
}
a.lp-mate:hover { border-color: #2F6FED; }
.lp-mate-n {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  background: #EDF2FE; color: #2F6FED; font-weight: 800; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
}
.lp-mate-t { font-weight: 700; font-size: .92rem; line-height: 1.3; }
.lp-mate-r { margin-left: auto; font-size: .78rem; color: #5A6068; white-space: nowrap; }
.lp-mate.lp-cur { background: #14181D; border-color: #14181D; color: #FAFAF8; }
.lp-cur .lp-mate-n { background: #2F6FED; color: #fff; }
.lp-mate-here {
  margin-left: auto; font-family: var(--mono, ui-monospace, monospace);
  font-size: .66rem; font-weight: 800; letter-spacing: .1em;
  color: #E8A33D; white-space: nowrap;
}
