/* 税本培训平台 — 宣纸 · 朱印 · 大气 */
:root {
  --ink: #1a1612;
  --muted: #6f675b;
  --line: #e2d8c8;
  --line-strong: #c9bba4;
  --paper: #f4efe6;
  --sheet: #fffcf6;
  --sidebar: #2a241d;
  --sidebar-text: #efe6d6;
  --gold: #c4a15a;
  --accent: #9d2b22;
  --accent-soft: #f6e6e1;
  --ok: #2d6a3a;
  --warn: #8a5a12;
  --shadow: 0 1px 2px rgba(40, 32, 18, 0.04), 0 14px 36px rgba(40, 32, 18, 0.06);
  --side-w: 236px;
  --serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 14px;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--side-w);
  flex-shrink: 0;
  background: var(--sidebar);
  color: var(--sidebar-text);
  padding: 22px 14px 40px;
  position: sticky; top: 0; height: 100vh; overflow: auto;
}
.brand {
  display: flex; gap: 10px; align-items: center;
  padding: 4px 8px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 16px;
}
.brand .seal {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--accent); color: #fff8ee;
  font-family: var(--serif); font-size: 20px;
  display: grid; place-items: center; letter-spacing: 0;
}
.brand b {
  display: block; font-family: var(--serif);
  font-size: 16px; letter-spacing: .16em; font-weight: 600;
}
.brand small {
  display: block; font-size: 11px; color: #c9bba4; letter-spacing: .06em; margin-top: 2px;
}
.nav-label {
  font-size: 11px; letter-spacing: .18em; color: #9a8d78;
  padding: 12px 10px 4px; text-transform: none;
}
.nav a {
  display: block; color: #efe6d6; padding: 7px 10px; margin: 1px 0;
  border-radius: 8px; font-size: 13.5px; border-bottom: 0;
}
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: #3a3229; color: #fff; box-shadow: inset 3px 0 0 var(--gold); }

.main { flex: 1; min-width: 0; background: var(--paper); }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(244,239,230,.9);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 5;
}
.who { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: #3a3229; color: #f4efe6;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 15px;
}
.who-name { font-size: 13px; font-weight: 600; }
.who-meta { font-size: 11px; color: var(--muted); }
.top-actions { display: flex; gap: 8px; align-items: center; }
.badge {
  display: inline-block; padding: 1px 8px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 11px; background: var(--sheet); color: var(--muted); margin-left: 4px;
}
.badge.warn { background: #f7edd8; color: var(--warn); border-color: #ead9b2; }
.badge.rose { background: var(--accent-soft); color: var(--accent); border-color: #e8c9c3; }
.badge.ok { background: #e6f0e7; color: var(--ok); border-color: #c9dccb; }
.badge.ink { background: var(--ink); color: #fff; border-color: var(--ink); }

.content { padding: 28px 36px 80px; max-width: 1200px; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 8px;
}
.page-head > div { min-width: 0; flex: 1; }
.head-actions {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  flex-shrink: 0; padding-bottom: 20px;
}
.eyebrow {
  font-size: 11px; letter-spacing: .22em; color: var(--gold);
  margin: 0 0 6px; font-weight: 600;
}
h1.page {
  font-family: var(--serif);
  font-size: 28px; font-weight: 600; letter-spacing: .08em;
  margin: 0 0 6px;
}
.lead { color: var(--muted); margin: 0 0 20px; }

.card {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 16px;
}
.card h2, .card h3 {
  font-family: var(--serif);
  margin: 0 0 12px; font-size: 17px; letter-spacing: .06em;
}
.card-foot { margin: 12px 0 0; }
.ident { margin-bottom: 20px; padding: 22px 24px; }
.ident-hi { font-family: var(--serif); font-size: 24px; margin: 0 0 4px; letter-spacing: .08em; }
.ident-stats { color: var(--ink); margin: 12px 0 8px; }
.ident-cap { margin: 4px 0; font-size: 13px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi, .card.stat {
  background: var(--sheet); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 16px 14px;
}
.kpi .n, .card.stat .n { font-family: var(--serif); font-size: 28px; line-height: 1.1; }
.kpi .l, .card.stat .l { font-size: 12px; color: var(--muted); margin-top: 6px; }
.card.stat { margin: 0; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: .06em;
  background: #f7f1e6;
}
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #faf6ee; }

.btn, button.btn, input[type=submit] {
  display: inline-block; background: var(--ink); color: #fffdf8 !important;
  border: 1px solid var(--ink); border-radius: 8px;
  padding: 7px 14px; font-size: 13px; cursor: pointer;
  text-decoration: none !important; font-family: inherit;
}
.btn:hover { background: #2e2820; }
.btn.ghost { background: transparent; color: var(--ink) !important; border-color: var(--line-strong); }
.btn.ghost:hover { background: #fff; }
.btn.gold, .btn.rose { background: var(--accent); border-color: var(--accent); color: #fff !important; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
form.inline { display: inline; }
label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date],
input[type=month], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong);
  border-radius: 8px; background: #fff; font-family: inherit; font-size: 14px; color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: #9a8f7a; box-shadow: 0 0 0 3px rgba(28,25,21,.06);
}
textarea { min-height: 90px; }
.flash { background: #eef4ea; color: var(--ok); padding: 10px 14px; border: 1px solid #c9dccb; border-radius: 8px; margin-bottom: 14px; }
.flash.err { background: var(--accent-soft); color: var(--accent); border-color: #e8c9c3; }

.filters {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: end;
  background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.filters > * { min-width: 140px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.muted { color: var(--muted); }
.right { float: right; }
hr.soft { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

.form-row, .row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px 16px;
}
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.choice { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; color: var(--ink); }
.choice input { width: auto; margin-top: 3px; }
.check-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 10px 0 4px; }
.check-row label { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ink); }
.check-row input { width: auto; }
.card.pin { box-shadow: 0 0 0 2px rgba(196,161,90,.45), var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.login-card .btn { width: 100%; text-align: center; margin-top: 8px; }
.empty {
  text-align: center; color: var(--muted); padding: 36px 16px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius); background: rgba(255,255,255,.4);
}

.catalog {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.course-card {
  display: block; background: var(--sheet); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 18px 16px; box-shadow: var(--shadow);
  min-height: 168px; color: inherit;
}
.course-card:hover { border-color: var(--line-strong); transform: translateY(-1px); color: inherit; }
.course-card h3 { font-family: var(--serif); font-size: 18px; margin: 8px 0 8px; letter-spacing: .04em; }
.course-card p { color: var(--muted); font-size: 13px; margin: 0 0 14px; min-height: 40px; }
.course-card .meta { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 12px; color: var(--muted); }
.course-card.locked { opacity: .78; cursor: not-allowed; }
.course-card.locked:hover { transform: none; }
.chip {
  display: inline-block; font-size: 11px; letter-spacing: .08em;
  padding: 2px 8px; border-radius: 999px; background: #f3ead6; color: #7a6230;
}

.login-wrap {
  min-height: 100vh; display: grid; place-items: center;
  background:
    radial-gradient(900px 420px at 12% -10%, #fff8ea, transparent 55%),
    radial-gradient(700px 360px at 110% 10%, #eadfce, transparent 50%),
    var(--paper);
}
.login-card {
  width: 460px; background: var(--sheet); border: 1px solid var(--line);
  border-radius: 18px; padding: 40px 36px 30px; box-shadow: var(--shadow);
}
.login-mark { font-size: 12px; letter-spacing: .2em; color: var(--gold); margin: 0 0 10px; }
.login-card h1 { font-family: var(--serif); letter-spacing: .2em; margin: 0 0 8px; font-size: 28px; }
.login-card p { color: var(--muted); margin: 0 0 18px; }
.login-hint { margin-top: 16px !important; font-size: 12px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.quick button {
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 12px;
}
.quick button:hover { border-color: var(--gold); }

.doc-frame { width: 100%; height: 420px; border: 0; background: #fff; border-radius: 8px; }
.doc-img { max-width: 100%; height: auto; background: #fff; border-radius: 8px; }
.preview {
  background: #fff; color: var(--ink); padding: 16px 18px;
  border: 1px solid var(--line); border-radius: 8px;
  white-space: pre-wrap; font-size: 13px; max-height: 360px; overflow: auto;
}
.tree { list-style: none; padding-left: 0; }
.tree ul { list-style: none; padding-left: 18px; border-left: 1px solid var(--line); }
.tree li { margin: 6px 0; }
.stars input { width: auto; }
.note-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.note-row:last-child { border-bottom: 0; }

.media-card { padding-bottom: 14px; }
.video-stage {
  display: grid; grid-template-columns: 1fr 280px; gap: 0;
  background: #111; border-radius: 12px; overflow: hidden; margin: 4px 0 8px;
}
.video-frame { position: relative; background: #000; min-height: 320px; }
.video-frame video { width: 100%; display: block; max-height: 520px; background: #000; }
.danmaku-layer { position: absolute; left: 0; right: 72px; top: 0; height: 46%; pointer-events: none; overflow: hidden; }
.danmaku {
  position: absolute; left: 100%; white-space: nowrap; color: #fff; font-size: 16px;
  text-shadow: 0 1px 3px rgba(0,0,0,.75); animation: danmaku-fly linear forwards;
}
@keyframes danmaku-fly {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100vw - 80px)); }
}
.video-rail { position: absolute; right: 12px; bottom: 72px; display: flex; flex-direction: column; gap: 14px; z-index: 3; }
.vlike, .vtoggle-cmt, .vtoggle-dm {
  width: 52px; height: 52px; border: 0; border-radius: 50%;
  background: rgba(20,16,12,.48); color: #fff; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.05; backdrop-filter: blur(6px); font-family: inherit;
}
.vlike .heart { font-size: 20px; }
.vlike.on { background: var(--accent); }
.vlike .n, .vtoggle-cmt .n { font-size: 11px; opacity: .9; }
.vtoggle-dm .cap { font-size: 11px; letter-spacing: .04em; }
.vtoggle-dm.off { opacity: .45; }
.video-stage.danmaku-off .danmaku-layer { display: none; }
.video-dock {
  background: #161310; color: #f4efe6; display: flex; flex-direction: column;
  min-height: 320px; max-height: 520px; border-left: 1px solid rgba(255,255,255,.06);
}
.video-stage.dock-off { grid-template-columns: 1fr; }
.video-stage.dock-off .video-dock { display: none; }
.vlist { flex: 1; overflow: auto; padding: 12px 12px 6px; }
.vempty { color: #8d8578; font-size: 13px; padding: 20px 8px; }
.vitem { padding: 7px 4px 8px; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 13px; }
.vitem b { display: block; color: #d8c7a6; font-size: 12px; margin-bottom: 2px; }
.vform { display: flex; gap: 8px; padding: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.vform input { flex: 1; background: #221d18; border: 1px solid #3a332b; color: #f4efe6; border-radius: 8px; }
.vform .btn { white-space: nowrap; }

@media (max-width: 1100px) {
  .kpis, .grid-4, .grid-3, .catalog { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .video-stage { grid-template-columns: 1fr; }
  .video-dock { max-height: 240px; min-height: 180px; }
}

/* —— 工作台版式 —— */
.workbench { margin-bottom: 4px; }
.toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  justify-content: space-between; margin: 0 0 12px;
}
.toolbar h3 { margin: 0; }
.toolbar .count { font-size: 12px; color: var(--muted); }

.list-card { padding: 0; overflow: hidden; }

.list-card .table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.list-card .table-scroll .data-table {
  width: 100%;
  min-width: max-content;
}

.list-card > h3,
.list-card .card-head {
  padding: 18px 22px 10px; margin: 0;
}
.list-card .card-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.list-card .card-head h3 { margin: 0; }
.list-card .card-head .count { font-size: 12px; color: var(--muted); }
.list-card .data-table { margin: 0; }
.list-card .data-table th:first-child,
.list-card .data-table td:first-child { padding-left: 22px; }
.list-card .data-table th:last-child,
.list-card .data-table td:last-child { padding-right: 22px; }
.list-card .empty { margin: 8px 22px 22px; border-left: 0; border-right: 0; border-radius: 0; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th, .data-table td {
  text-align: left; padding: 12px 14px;
  border-bottom: 1px solid var(--line); vertical-align: middle;
}
.data-table thead th {
  color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: .08em;
  background: #f7f1e6; border-bottom: 1px solid var(--line-strong);
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #faf6ee; }
.data-table td:first-child { font-weight: 600; color: var(--ink); }
.data-table .cell-sub {
  display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 2px;
}
.data-table td.actions, .data-table th.actions { text-align: right; white-space: nowrap; }
.data-table .row-actions-cell {
  display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; align-items: center;
}

.status-pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 11px; letter-spacing: .06em; white-space: nowrap;
  background: #f3ead6; color: #7a6230; border: 1px solid #ead9b2;
}
.status-pill.ok { background: #e6f0e7; color: var(--ok); border-color: #c9dccb; }
.status-pill.warn { background: #f7edd8; color: var(--warn); border-color: #ead9b2; }
.status-pill.rose { background: var(--accent-soft); color: var(--accent); border-color: #e8c9c3; }
.status-pill.ink { background: var(--ink); color: #fff8ee; border-color: var(--ink); }
.status-pill.muted { background: #f4efe6; color: var(--muted); border-color: var(--line); }

.split-create { max-width: 720px; }
.split-create.wide { max-width: 880px; }

.meta-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px 16px; margin: 14px 0 4px;
}
.meta-grid .l {
  display: block; font-size: 11px; color: var(--muted);
  letter-spacing: .08em; margin-bottom: 4px;
}
.meta-grid .v { color: var(--ink); font-size: 14px; }

.person-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 10px;
}
.person-head h3 { margin: 0 0 4px; }
.person-head .muted { margin: 0; }

.reply-meta { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.reply-meta b { color: var(--ink); }
.thread-body { margin: 0; white-space: pre-wrap; }

.exam-clock {
  font-family: var(--serif); font-size: 22px; color: var(--accent);
  letter-spacing: .04em; font-weight: 600;
}
.q-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.q-head h3 { margin: 0 0 12px; flex: 1; }
.score-hero { margin-bottom: 8px; }

.path-steps { list-style: none; padding: 0; margin: 14px 0 0; }
.path-steps li {
  position: relative; padding: 10px 0 10px 22px;
  border-left: 1px solid var(--line); margin-left: 7px;
}
.path-steps li:last-child { border-left-color: transparent; }
.path-steps li::before {
  content: ""; position: absolute; left: -5px; top: 16px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 0 3px var(--sheet);
}
.path-steps li.done::before { background: var(--ok); }
.path-steps li.locked { opacity: .62; }
.path-steps li.locked::before { background: var(--line-strong); }
.path-steps .path-locked { color: var(--muted); cursor: not-allowed; }

.file-well {
  margin: 12px 0 4px; padding: 16px;
  border: 1px dashed var(--line-strong); border-radius: 10px; background: #fff;
}
.file-well input[type=file] { width: 100%; }

.hub-card .chip { margin-bottom: 8px; }
.hub-card p { color: var(--muted); font-size: 13px; }

.login-card { position: relative; width: 480px; padding: 44px 40px 34px; }
.login-card::before {
  content: ""; position: absolute; left: 0; top: 32px; bottom: 32px;
  width: 3px; background: var(--accent); border-radius: 0 2px 2px 0;
}
.login-brand .seal { width: 44px; height: 44px; font-size: 24px; }
.login-brand { margin-bottom: 14px; }

@media (max-width: 1100px) {
  .page-head { flex-direction: column; align-items: stretch; }
  .head-actions { padding-bottom: 8px; }
  .split-create, .split-create.wide { max-width: none; }
}


.live-actions { gap: 10px; }
.live-bench .toolbar { margin-bottom: 4px; }
.live-meta { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 12px; }
.live-hint { margin: 0 0 12px; }
.live-empty { margin: 8px 0 4px; min-height: 160px; display: flex; align-items: center; justify-content: center; }
.live-wait {
  position: absolute; left: 0; right: 0; top: 0; bottom: 42px; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  background: #14110e; color: #efe6d6;
  font-family: var(--serif); font-size: 20px; letter-spacing: .14em;
  pointer-events: none;
}
.live-wait[hidden] { display: none !important; }
.video-stage[data-screen] .danmaku-layer { z-index: 3; }
.video-stage[data-screen] .video-frame video { min-height: 360px; object-fit: contain; }


.upload-progress {
  margin: 14px 0 4px;
  padding: 12px 14px;
  background: #fff8ee;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.upload-progress .up-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 8px;
}
.upload-progress .up-name { color: var(--ink); font-weight: 600; }
.upload-bar {
  height: 8px; background: #efe6d6; border-radius: 99px; overflow: hidden;
  border: 1px solid #ead9b2;
}
#up-fill {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 99px;
  transition: width .18s ease;
}
.upload-status {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: .04em;
}
#upload-submit:disabled { opacity: .55; cursor: wait; }

.exam-ready { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(196,161,90,.35), var(--shadow); }
.exam-ready h3 { color: var(--accent); }

.recs-block { margin-top: 16px; }
.recs-lead { margin: 0 0 12px; }
.recs-catalog {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  margin-top: 4px;
}
.recs-catalog .course-card { min-height: 148px; }
.recs-catalog .course-card p { min-height: 36px; }
@media (min-width: 1200px) {
  .recs-catalog { grid-template-columns: repeat(5, 1fr); }
}

.line-tabs { display:flex; flex-wrap:wrap; gap:8px; margin: 4px 0 14px; }
.line-tabs .chip { display:inline-block; padding:6px 12px; border:1px solid var(--line-strong); border-radius:999px; background:#fff; }
.line-tabs .chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* —— 子页对齐工作台（08）不另起色板 —— */
.ident .lead, .ident-lead { margin: 0; }
.login-brand .login-mark { margin: 0; }
.filters .grow { flex: 1; min-width: 240px; }
.discuss-hint { margin-top: -6px; }
.thread-reply { padding-left: 20px; }
.thread-reply-form { padding-left: 20px; margin-bottom: 12px; }
.file-hint { margin: 10px 0 0; }
.answer-body {
  margin: 0;
  white-space: pre-wrap;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
}
.rec-list { list-style: none; padding: 4px 22px 16px; margin: 0; }
.rec-list .cell-sub, .cell-sub { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 2px; }
.rec-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.rec-list li:last-child { border-bottom: 0; }
.pin-row, .note-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.pin-row:last-child, .card .note-row:last-child { border-bottom: 0; }
.weak-col b { display: block; margin-bottom: 8px; font-size: 13px; }
.weak-col p { margin: 0 0 6px; font-size: 13px; }
.data-table .cell-input,
.user-table .cell-input {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  font-size: 13px;
}
.user-table select.cell-input { min-width: 88px; }
.user-table td { vertical-align: middle; }
.quick .btn { width: auto; margin-top: 0; }
.list-card > h3.sr-only { position: absolute; left: -9999px; }

.tag-dim-block { margin: 8px 0 12px; display: grid; gap: 8px; }
.tag-dim { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 12px; }
.tag-dims { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; }
.dim-label { font-size: 12px; color: var(--muted); min-width: 2.5em; padding-top: 6px; }
.tag-dim .check-row { margin: 0; }

.tree-res { margin: 4px 0 8px; }
.tree-res summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.tree-res summary:hover { color: var(--ink); }
.tree-res ul { margin-top: 4px; }

.chip.owner-prep { background: #eef2ea; color: #4a5c3a; letter-spacing: .04em; margin-left: 6px; vertical-align: middle; }
.course-card .chip.owner-prep { margin-left: 0; }


.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger {
  display: none;
  width: 40px; height: 40px; margin-right: 8px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--sheet); color: var(--ink);
  font-size: 20px; line-height: 1; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-scrim { display: none; }
@media (max-width: 1100px) {
  .nav-burger { display: inline-flex; }
  body.nav-open .sidebar,
  body:has(#nav-toggle:checked) .sidebar {
    display: block;
    position: fixed; left: 0; top: 0; z-index: 40;
    height: 100vh; box-shadow: var(--shadow);
  }
  body.nav-open .nav-scrim,
  body:has(#nav-toggle:checked) .nav-scrim {
    display: block; position: fixed; inset: 0; z-index: 35;
    background: rgba(26,22,18,.4);
  }
}

@media (max-width: 480px) {
  body.nav-open .sidebar,
  body:has(#nav-toggle:checked) .sidebar {
    width: min(72vw, 210px);
    max-width: calc(100vw - 64px);
    padding: 16px 10px 32px;
  }
  .brand b { letter-spacing: .08em; }
  .nav a { overflow-wrap: anywhere; }
  .content { padding: 16px 14px 64px; }
  .catalog, .recs-catalog { grid-template-columns: 1fr; }
  .kpis, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .filters {
    flex-wrap: wrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .filters > * { min-width: 0; flex: 1 1 100%; }
  .filters .grow { min-width: 0; }
  .line-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .line-tabs .chip { flex-shrink: 0; white-space: nowrap; }
  .list-card { overflow: hidden; }
  .list-card .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .list-card .data-table {
    display: table;
    width: 100%;
    min-width: max-content;
  }
  .data-table { min-width: 0; }
  .head-actions { flex-wrap: wrap; width: 100%; }
  .live-actions { flex-wrap: wrap; }
  .form-row, .row { grid-template-columns: 1fr; }
  .course-card { padding: 12px; min-height: 0; }
  .course-card p { min-height: 0; margin-bottom: 10px; }
  .data-table td.actions, .data-table th.actions { white-space: normal; }
  .video-stage { grid-template-columns: 1fr; }
  .video-frame { display: flex; flex-direction: column; }
  .video-rail {
    position: static;
    right: auto;
    bottom: auto;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    padding: 2px 8px 4px;
    z-index: 1;
  }
  .vlike, .vtoggle-cmt, .vtoggle-dm {
    width: auto; min-width: 0; height: 28px;
    border-radius: 999px;
    padding: 0 8px;
    flex-direction: row;
    gap: 4px;
    white-space: nowrap;
  }
  .vlike .heart { font-size: 14px; }
  .vlike .n, .vtoggle-cmt .n, .vtoggle-dm .cap { font-size: 11px; letter-spacing: 0; }
  .vform { flex-wrap: wrap; }
  .vform input { flex: 1 1 140px; min-width: 0; }
  .vform .btn { flex: 0 0 auto; }
  .login-wrap { padding: 16px; box-sizing: border-box; }
  .login-card {
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    padding: 24px 18px 20px;
  }
  .login-card h1 { font-size: 22px; letter-spacing: .12em; }
  .topbar {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 6px 8px;
    align-items: center;
  }
  .who { min-width: 0; flex: 1 1 0; }
  .who-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 42vw;
  }
  .top-actions {
    flex: 0 0 auto;
    flex-wrap: wrap;
    margin-left: auto;
  }
  .q-head {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .q-head h3 {
    min-width: 0;
    flex: 1 1 100%;
    word-break: break-word;
  }
}
