/* Courses page (learn.html): same dark theme and lime accent as the chat */
.learn-page { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.lp-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 18px; padding: 12px 20px; padding-top: max(12px, env(safe-area-inset-top)); background: rgba(11, 11, 12, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.lp-brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
.lp-logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--lime); color: var(--ink); font-weight: 800; }
.lp-sub { color: var(--mute); }
.lp-nav { display: flex; gap: 4px; margin-inline: auto; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.lp-nav a { padding: 6px 14px; border-radius: 999px; color: var(--mute); text-decoration: none; font-size: 14px; }
.lp-nav a[aria-current="page"] { background: var(--lime); color: var(--ink); font-weight: 650; }
.lp-stats { display: flex; gap: 10px; font-size: 14px; font-weight: 650; white-space: nowrap; }
.lp-main { width: 100%; max-width: 960px; margin: 0 auto; padding: 24px 20px 48px; flex: 1; }
.lp-foot { padding: 18px 20px 28px; text-align: center; color: var(--mute); font-size: 12.5px; border-top: 1px solid var(--line); }
.lp-foot a { color: var(--mute); }

.lp-hero h1 { font-size: clamp(26px, 4vw, 34px); letter-spacing: -.02em; }
.lp-hero p { color: var(--mute); margin-top: 6px; max-width: 560px; }
.lp-resume { display: flex; flex-direction: column; gap: 2px; margin-top: 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--lime); color: var(--text); text-decoration: none; max-width: 520px; }
.lp-resume span { font-size: 12px; color: var(--lime); text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }
.lp-filter { display: flex; gap: 6px; margin: 22px 0 14px; }
.lp-filter button { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--mute); font-size: 14px; }
.lp-filter button[aria-selected="true"] { border-color: var(--lime); color: var(--text); background: var(--surface-2); }
.lp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.lp-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.lp-card:hover { border-color: #3a3a40; transform: translateY(-1px); }
.lp-card b { font-size: 17px; }
.lp-card small { color: var(--mute); }
.lp-tag { align-self: flex-start; font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--lime); }
.lp-bar { display: block; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.lp-bar.big { height: 8px; max-width: 420px; margin: 10px 0 14px; }
.lp-bar i { display: block; height: 100%; background: var(--lime); border-radius: 99px; }
.lp-go { font-size: 13.5px; font-weight: 650; margin-top: 2px; }
.lp-empty { color: var(--mute); padding: 30px 0; }
.lp-empty a { color: var(--lime); }

.lp-crumbs { font-size: 13.5px; color: var(--mute); margin-bottom: 16px; }
.lp-crumbs a { color: var(--mute); }
.lp-course-head h1 { font-size: 30px; letter-spacing: -.02em; }
.lp-course-head h1 span { color: var(--mute); font-weight: 500; }
.lp-course-head p { color: var(--mute); margin-top: 4px; }
.lp-btn { display: inline-flex; align-items: center; gap: 6px; padding: 11px 18px; border-radius: 999px; background: var(--lime); color: var(--ink); font-weight: 700; text-decoration: none; }
.lp-done-all { color: var(--lime); font-weight: 650; }
.lp-topics { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 8px; }
.lp-topics li a, .lp-topics li.soon { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.lp-topics li a:hover { border-color: #3a3a40; }
.lp-topics .num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 13px; font-weight: 700; color: var(--mute); }
.lp-topics li.done .num { background: var(--lime); color: var(--ink); }
.lp-topics small { color: var(--mute); font-size: 12.5px; }
.lp-topics li.soon { opacity: .5; }

.lp-lesson { max-width: 760px; }
.lp-lesson h1 { font-size: clamp(24px, 3.6vw, 30px); letter-spacing: -.02em; margin-bottom: 18px; }
.lp-lesson section { margin-top: 26px; }
.lp-lesson h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--lime); margin-bottom: 10px; }
.lp-lesson h3 { font-size: 14px; margin: 14px 0 6px; }
.lp-lesson p { line-height: 1.65; }
.lp-terms { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 6px 14px; margin: 0; line-height: 1.55; }
.lp-terms dt { font-weight: 650; }
.lp-terms dd { margin: 0; color: #cfcfd4; }
@media (max-width: 520px) { .lp-terms { grid-template-columns: 1fr; } .lp-terms dd { margin-bottom: 6px; } }
.lp-formula small.use b { color: var(--text); font-weight: 650; }
.lp-formulas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.lp-formula { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.lp-formula code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 15.5px; color: var(--text); background: var(--surface-2); padding: 8px 10px; border-radius: 8px; overflow-wrap: anywhere; }
.lp-formula small { color: var(--mute); font-size: 12.5px; line-height: 1.5; }
.lp-formula small.use { color: #b9b9c0; }
.lp-worked { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 10px; }
.lp-worked summary { padding: 14px 16px; cursor: pointer; font-weight: 600; line-height: 1.5; list-style: none; }
.lp-worked summary::-webkit-details-marker { display: none; }
.lp-worked summary::before { content: '▸ '; color: var(--lime); }
.lp-worked[open] summary::before { content: '▾ '; }
.lp-steps { margin: 0 16px; padding: 0; list-style: none; counter-reset: s; }
.lp-steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 9px 0; border-top: 1px dashed var(--line); line-height: 1.55; overflow-wrap: anywhere; }
.lp-steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--lime); font-size: 12px; font-weight: 700; }
.lp-answer { margin: 10px 16px 16px; padding: 12px 14px; border-radius: 10px; background: rgba(179, 253, 29, .08); border: 1px solid rgba(179, 253, 29, .35); line-height: 1.55; }
.lp-answer span { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lime); margin-bottom: 2px; }
.lp-ex .lp-answer { margin: 10px 0 0; }
.lp-hint { color: var(--mute); font-size: 13.5px; margin-bottom: 8px; }
.lp-ex { padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 10px; }
.lp-show { margin-top: 10px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; }
.lp-show:hover { border-color: var(--lime); }
.lp-self { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.lp-self .ok, .lp-self .help { padding: 7px 14px; border-radius: 999px; font-size: 14px; border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.lp-self .ok { border-color: rgba(179, 253, 29, .5); }
.lp-self .ok:disabled { color: var(--lime); cursor: default; }
.lp-next { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--line); }
.lp-ask { color: var(--mute); }

@media (max-width: 640px) {
  .lp-top { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .lp-nav { order: 3; margin: 0; width: 100%; justify-content: center; }
  .lp-stats { margin-left: auto; }
  .lp-main { padding: 18px 16px 40px; }
  .lp-next { flex-direction: column-reverse; align-items: stretch; text-align: center; }
  .lp-btn { justify-content: center; }
}

/* university courses: search, subject areas, more results */
.lp-search { display: flex; gap: 8px; margin: 4px 0 12px; }
.lp-search input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 15px; }
.lp-search input:focus { outline: 2px solid var(--lime); outline-offset: 1px; }
.lp-search button { padding: 0 18px; border-radius: 12px; border: 0; background: var(--lime); color: #040404; font-weight: 700; }
.lp-areas { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.lp-areas button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--mute); font-size: 13px; font-weight: 600; }
.lp-areas button small { opacity: .7; font-weight: 500; }
.lp-areas button[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: #040404; }
.lp-count { color: var(--mute); font-size: 13px; margin: 0 2px 10px; }
.lp-more { display: block; margin: 16px auto 0; padding: 10px 20px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); font-weight: 600; }
.lp-kind { color: var(--mute); font-size: 13px; margin: -4px 0 12px; }
.lp-writing { display: flex; align-items: center; gap: 14px; padding: 40px 0; color: var(--mute); }
.lp-lecture { margin: 0 0 18px; }
.lp-btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--lime); }
.lp-pics:empty { display: none; }
.lp-course-head .lp-tag { display: inline-block; margin-bottom: 6px; }
@media (max-width: 640px) { .lp-search button { padding: 0 12px; } }
