/* LMS BMC base styles. No build step: plain CSS with design tokens. */
:root {
  --bg: #f6f5f3; --surface: #ffffff; --text: #1d1b1a; --muted: #6b6661; --line: #e3dfda;
  --accent: #b0336b; --accent-text: #ffffff; --accent-soft: #f8e8ef;
  --ok: #1f7a4d; --ok-soft: #e4f4ec; --err: #b3261e; --err-soft: #fbe9e7; --warn: #8a5a00; --warn-soft: #fdf1d8;
  --radius: 10px; --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161514; --surface: #201e1d; --text: #f1eeeb; --muted: #a39d97; --line: #35312e;
    --accent: #e0699c; --accent-text: #1d1b1a; --accent-soft: #3a2230;
    --ok: #6fcf9b; --ok-soft: #1c3327; --err: #f2867f; --err-soft: #3b1f1d; --warn: #e5b85c; --warn-soft: #3a2f17;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 1rem; }
h2 { font-size: 1.2rem; margin: 1.5rem 0 .75rem; }
h3 { font-size: 1rem; margin: 1rem 0 .5rem; }
.muted, .hint { color: var(--muted); }
.hint { font-size: .85rem; font-weight: 400; }

.topbar { display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 700; letter-spacing: .04em; color: var(--text); }
.nav { display: flex; gap: 1rem; flex: 1; flex-wrap: wrap; }
.logout { display: flex; align-items: center; gap: .5rem; margin: 0 0 0 auto; }
.who { color: var(--muted); font-size: .9rem; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subnav { display: flex; gap: 1rem; flex-wrap: wrap; padding: .5rem 1rem; background: var(--surface); border-bottom: 1px solid var(--line); font-size: .95rem; }
.subnav a[aria-current="page"] { font-weight: 600; color: var(--text); }

main.page { max-width: 1040px; margin: 0 auto; padding: 1.25rem 1rem 4rem; }
main.narrow { max-width: 460px; margin: 0 auto; padding: 2rem 1rem 4rem; }
main.wide { max-width: 1280px; margin: 0 auto; padding: 1.25rem 1rem 4rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }

.form { display: grid; gap: .85rem; }
.form label { display: grid; gap: .3rem; font-weight: 600; font-size: .95rem; }
.form .check { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: .55rem .7rem; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px;
}
textarea { min-height: 9rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .5rem .9rem; font: inherit; font-weight: 600;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; }
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-danger { color: var(--err); border-color: var(--err); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-sm { padding: .25rem .55rem; font-size: .85rem; }
form.inline { display: inline; margin: 0; }

.flash { padding: .7rem .9rem; border-radius: 8px; margin-bottom: 1rem; }
.flash-ok { background: var(--ok-soft); color: var(--ok); }
.flash-err { background: var(--err-soft); color: var(--err); }

.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--line); color: var(--text); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-err { background: var(--err-soft); color: var(--err); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: .85rem; }

.crumbs { display: flex; gap: .4rem; flex-wrap: wrap; color: var(--muted); font-size: .9rem; margin-bottom: .75rem; }
.crumbs a { color: var(--muted); }
progress { width: 100%; height: 6px; border: 0; border-radius: 999px; background: var(--line); accent-color: var(--accent); appearance: none; -webkit-appearance: none; }
progress::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.locked { opacity: .65; }
.tree { list-style: none; margin: 0; padding: 0; }
.tree .tree { margin-left: 1.25rem; border-left: 1px dashed var(--line); padding-left: .75rem; }
.tree-item { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .4rem 0; }
.tree-title { font-weight: 600; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .03em; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Protected player: deters casual copying; it cannot prevent screen recording. */
.player { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; }
.player video { display: block; width: 100%; max-height: 72vh; }
.watermark { position: absolute; pointer-events: none; color: rgba(255,255,255,.35); font-size: .8rem; text-shadow: 0 0 2px rgba(0,0,0,.6); user-select: none; top: 8%; left: 6%; }
.noselect { user-select: none; -webkit-user-select: none; }

@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; }
  .who { display: none; }
  h1 { font-size: 1.35rem; }
}
