/* Py错题站 — visual system
   warm paper + deep forest + electric lime / violet accents */

:root {
  --bg: #f3f0e7;
  --bg-deep: #ebe7dc;
  --surface: #fffdf8;
  --surface-2: #f8f5ec;
  --ink: #17251d;
  --ink-2: #36443b;
  --muted: #778078;
  --faint: #a3aaa3;
  --line: rgba(23, 37, 29, .12);
  --line-strong: rgba(23, 37, 29, .2);
  --forest: #13231b;
  --forest-2: #1c3327;
  --lime: #c9f36d;
  --lime-deep: #a8d848;
  --violet: #6857d8;
  --violet-soft: #eeeaff;
  --orange: #ec7b4e;
  --orange-soft: #fff0e8;
  --rose: #d95a72;
  --rose-soft: #ffedf1;
  --blue: #367fdb;
  --blue-soft: #eaf2ff;
  --green: #2c8a5c;
  --green-soft: #e8f7ee;
  --amber: #b9801f;
  --amber-soft: #fff6df;
  --shadow-sm: 0 1px 2px rgba(23, 37, 29, .04), 0 8px 24px rgba(23, 37, 29, .04);
  --shadow-md: 0 18px 50px rgba(23, 37, 29, .1);
  --shadow-lg: 0 30px 80px rgba(23, 37, 29, .16);
  --radius: 22px;
  --radius-sm: 14px;
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  --serif: "Songti SC", "STSong", "SimSun", Georgia, serif;
  --mono: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(201, 243, 109, .22), transparent 60%),
    radial-gradient(900px 500px at 5% 20%, rgba(104, 87, 216, .07), transparent 55%),
    var(--bg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
svg { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.is-hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }

::selection { background: var(--lime); color: var(--forest); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(23, 37, 29, .18); border: 3px solid transparent; border-radius: 99px; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------- login */
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(440px, .88fr);
  background: var(--bg);
}
.login-art {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 44px 56px 32px;
  color: #f4f1e7;
  background:
    radial-gradient(700px 500px at 80% 10%, rgba(201, 243, 109, .13), transparent 55%),
    radial-gradient(500px 400px at 10% 100%, rgba(104, 87, 216, .2), transparent 60%),
    var(--forest);
  display: flex;
  flex-direction: column;
}
.login-art-grid {
  position: absolute;
  inset: 0;
  opacity: .13;
  background-image: linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}
.login-art::after {
  content: "DEBUG";
  position: absolute;
  right: -30px;
  bottom: 105px;
  color: rgba(255,255,255,.035);
  font-family: var(--mono);
  font-size: 180px;
  font-weight: 900;
  letter-spacing: -.08em;
  line-height: 1;
  pointer-events: none;
}
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; }
.login-brand strong { display: block; font-size: 18px; letter-spacing: .03em; }
.login-brand span:not(.brand-mark) { display: block; margin-top: 2px; color: rgba(255,255,255,.45); font-family: var(--mono); font-size: 9px; letter-spacing: .18em; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  background: var(--lime);
  color: var(--forest);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -.04em;
  box-shadow: inset 0 -3px 0 rgba(19,35,27,.16);
}
.brand-mark-lg { width: 48px; height: 48px; flex-basis: 48px; border-radius: 14px; font-size: 17px; }
.login-copy { position: relative; z-index: 1; max-width: 610px; margin-top: auto; padding-top: 60px; }
.login-copy .eyebrow { color: var(--lime); }
.login-copy h1 {
  margin: 0 0 22px;
  font-size: clamp(42px, 4.7vw, 70px);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1.12;
}
.login-copy h1 em { color: var(--lime); font-family: var(--serif); font-style: italic; letter-spacing: -.04em; }
.login-lede { max-width: 530px; margin: 0; color: rgba(244,241,231,.65); font-size: 14.5px; line-height: 1.9; }
.feature-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.feature-row span {
  padding: 6px 11px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 99px;
  color: rgba(255,255,255,.7);
  font-size: 11px;
  letter-spacing: .04em;
}
.login-code-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  margin: 40px 0 auto;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  background: rgba(8, 17, 12, .58);
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  transform: rotate(-1.2deg);
  backdrop-filter: blur(10px);
}
.window-dots { display: flex; align-items: center; gap: 6px; height: 37px; padding: 0 14px; border-bottom: 1px solid rgba(255,255,255,.09); }
.window-dots i { width: 7px; height: 7px; border-radius: 99px; background: rgba(255,255,255,.25); }
.window-dots i:first-child { background: #f27b68; }
.window-dots i:nth-child(2) { background: #efc45e; }
.window-dots i:nth-child(3) { background: #78c884; }
.window-dots span { margin-left: 6px; color: rgba(255,255,255,.35); font-family: var(--mono); font-size: 10px; }
.login-code-card pre { margin: 0; padding: 18px 20px 20px; overflow: hidden; color: #d9e2da; font-family: var(--mono); font-size: 11.5px; line-height: 1.85; }
.login-code-card .c-muted { color: #627468; }
.login-code-card .c-pink { color: #ff8e9e; }
.login-code-card .c-green { color: #a7d9a9; }
.login-code-card .c-lime { color: var(--lime); }
.code-float {
  position: absolute; right: -18px; bottom: -17px;
  padding: 8px 13px;
  border-radius: 8px;
  background: var(--lime);
  color: var(--forest);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
  transform: rotate(1.2deg);
}
.login-foot { position: relative; z-index: 1; margin-top: 36px; color: rgba(255,255,255,.32); font-size: 10.5px; letter-spacing: .04em; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 42px 48px; background: var(--surface); }
.login-panel-inner { width: 100%; max-width: 380px; }
.login-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 28px; }
.login-panel h2 { margin: 0 0 7px; font-size: 30px; letter-spacing: -.04em; line-height: 1.25; }
.login-panel .muted { margin: 0 0 26px; font-size: 12px; }
.auth-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 22px; border-radius: 12px; background: var(--bg); }
.auth-tab { flex: 1; border: 0; border-radius: 8px; padding: 9px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.auth-tab.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.auth-form { display: grid; gap: 15px; }
.field { display: grid; gap: 7px; }
.field > span { color: var(--ink-2); font-size: 11px; font-weight: 700; }
.field input, .field textarea, .field select, .input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: var(--surface);
  padding: 11px 13px;
  font-size: 13px;
  transition: border .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 90px; line-height: 1.7; }
.field input:focus, .field textarea:focus, .field select:focus, .input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(104, 87, 216, .12);
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.form-grid { display: grid; gap: 13px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-error { min-height: 0; margin: -2px 0 0; color: var(--rose); font-size: 11.5px; }
.form-error:empty { display: none; }
.login-privacy { display: flex; align-items: center; gap: 7px; margin: 27px 0 0; color: var(--faint); font-size: 10.5px; }
.status-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 99px; background: #5cb87b; box-shadow: 0 0 0 3px rgba(92,184,123,.12); }
.demo-block { margin-top: 24px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 10px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.demo-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; }
.demo-btn {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  padding: 10px;
  text-align: left;
  transition: border .15s, background .15s, transform .15s;
}
.demo-btn:hover { border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-1px); }
.demo-icon { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 29px; border-radius: 8px; background: var(--bg); color: var(--ink); font-size: 11px; font-weight: 800; }
.demo-btn:nth-child(1) .demo-icon { background: var(--violet-soft); color: var(--violet); }
.demo-btn b { display: block; font-size: 11px; line-height: 1.4; }
.demo-btn small { display: block; margin-top: 1px; color: var(--faint); font-size: 9px; }
.login-hint { margin: 14px 0 0; color: var(--faint); font-size: 10px; text-align: center; }
.login-hint code { padding: 2px 5px; border-radius: 4px; background: var(--bg); color: var(--ink-2); font-family: var(--mono); font-size: 9.5px; }

/* ------------------------------------------------------------- shell */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  width: 246px;
  display: flex; flex-direction: column;
  padding: 25px 16px 18px;
  color: #e9eee8;
  background:
    radial-gradient(420px 300px at 0% 0%, rgba(201,243,109,.09), transparent 65%),
    var(--forest);
  border-right: 1px solid rgba(255,255,255,.04);
}
.sidebar-top { padding: 0 8px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .brand-mark { width: 35px; height: 35px; flex-basis: 35px; border-radius: 10px; font-size: 12px; }
.brand-text strong { display: block; color: #f4f1e7; font-size: 15px; letter-spacing: .06em; line-height: 1.2; }
.brand-text small { display: block; margin-top: 3px; color: rgba(255,255,255,.34); font-family: var(--mono); font-size: 7.5px; letter-spacing: .17em; }
.class-chip {
  display: flex; align-items: center; gap: 7px;
  margin-top: 22px; padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  color: rgba(255,255,255,.55);
  font-size: 10px;
}
.class-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.class-dot { width: 5px; height: 5px; flex: 0 0 5px; border-radius: 99px; background: var(--lime); box-shadow: 0 0 0 3px rgba(201,243,109,.1); }
.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 28px; }
.nav-group-label { margin: 14px 11px 5px; color: rgba(255,255,255,.25); font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: .16em; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 10px 11px;
  color: rgba(255,255,255,.56);
  font-size: 12.5px;
  text-align: left;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.is-active { background: var(--lime); color: var(--forest); font-weight: 800; box-shadow: 0 5px 16px rgba(201,243,109,.12); }
.nav-item svg { width: 17px; height: 17px; flex: 0 0 17px; }
.nav-badge { margin-left: auto; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 99px; background: rgba(255,255,255,.13); color: inherit; font-size: 9px; line-height: 17px; text-align: center; }
.nav-item.is-active .nav-badge { background: rgba(19,35,27,.14); }
.sidebar-foot { margin-top: auto; padding-top: 20px; }
.sidebar-note {
  position: relative;
  margin: 0 4px 14px;
  padding: 13px 13px 13px 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  background: rgba(255,255,255,.035);
}
.sidebar-note p { margin: 0; color: rgba(255,255,255,.42); font-family: var(--serif); font-size: 11.5px; font-style: italic; line-height: 1.7; }
.note-spark { position: absolute; right: 9px; top: 5px; color: var(--lime); font-size: 15px; opacity: .55; }
.sidebar-user {
  display: flex; align-items: center; gap: 9px;
  width: 100%; border: 0; border-radius: 10px;
  background: transparent; padding: 8px;
  color: #fff; text-align: left;
}
.sidebar-user:hover { background: rgba(255,255,255,.05); }
.avatar {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; flex: 0 0 30px;
  border-radius: 99px;
  background: var(--violet);
  color: #fff;
  font-size: 11px; font-weight: 700;
  overflow: hidden;
}
.avatar-lg { width: 42px; height: 42px; flex-basis: 42px; font-size: 14px; }
.avatar-sm { width: 23px; height: 23px; flex-basis: 23px; font-size: 9px; }
.sidebar-user-text { min-width: 0; }
.sidebar-user-text b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.sidebar-user-text small { display: block; margin-top: 2px; color: rgba(255,255,255,.34); font-size: 9px; }
.sidebar-user-more { margin-left: auto; color: rgba(255,255,255,.3); font-size: 15px; letter-spacing: .05em; }

.app-main { min-height: 100vh; margin-left: 246px; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  height: 72px;
  padding: 0 34px;
  border-bottom: 1px solid rgba(23,37,29,.07);
  background: rgba(243,240,231,.82);
  backdrop-filter: blur(16px);
}
.topbar-crumb { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 11px; white-space: nowrap; }
.topbar-crumb strong { color: var(--ink); font-weight: 700; }
.crumb-slash { opacity: .4; }
.topbar-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.global-search {
  display: flex; align-items: center; gap: 7px;
  width: 230px; height: 35px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(255,253,248,.65);
  transition: border .15s, background .15s;
}
.global-search:focus-within { border-color: var(--line-strong); background: var(--surface); }
.global-search svg { width: 14px; height: 14px; color: var(--faint); }
.global-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 11px; }
.global-search input::placeholder { color: var(--faint); }
.global-search kbd { padding: 1px 4px; border: 1px solid var(--line); border-radius: 4px; color: var(--faint); font-family: var(--mono); font-size: 8px; }
.week-chip {
  display: flex; align-items: center; gap: 6px;
  height: 35px; padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,253,248,.6);
  color: var(--ink-2);
  font-size: 10.5px;
}
.week-chip svg { width: 13px; height: 13px; color: var(--muted); }
.ai-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,253,248,.6); color: var(--muted); font-size: 9.5px; white-space: nowrap; }
.ai-pill i { width: 5px; height: 5px; border-radius: 99px; background: #53a874; }
.ai-pill.is-api { border-color: rgba(104,87,216,.25); background: var(--violet-soft); color: var(--violet); }
.ai-pill.is-api i { background: var(--violet); }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 35px; height: 35px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font-size: 18px;
  transition: background .15s, border .15s;
}
.icon-btn:hover { background: rgba(255,255,255,.65); border-color: var(--line); }
.icon-btn svg { width: 17px; height: 17px; }
.bell-btn { position: relative; }
.bell-badge { position: absolute; top: 4px; right: 3px; min-width: 14px; height: 14px; padding: 0 4px; border-radius: 99px; background: var(--rose); color: #fff; font-size: 8px; line-height: 14px; text-align: center; }
.top-avatar { display: grid; place-items: center; width: 34px; height: 34px; margin-left: 2px; border: 0; border-radius: 99px; background: transparent; padding: 0; }
.mobile-menu { display: none; }
.view-root { width: 100%; max-width: 1380px; margin: 0 auto; padding: 32px 36px 56px; outline: none; }
.app-foot { display: flex; justify-content: space-between; gap: 20px; max-width: 1380px; margin: auto auto 0; width: 100%; padding: 20px 36px 25px; border-top: 1px solid var(--line); color: var(--faint); font-size: 9.5px; }

/* ------------------------------------------------------------- shared */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform .15s, background .15s, border .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.btn-primary { background: var(--forest); color: var(--lime); box-shadow: 0 5px 14px rgba(19,35,27,.16); }
.btn-primary:hover { background: #203b2d; }
.btn-lime { background: var(--lime); color: var(--forest); box-shadow: 0 5px 14px rgba(168,216,72,.22); }
.btn-lime:hover { background: #d4fa7f; }
.btn-ghost { border-color: var(--line); background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(255,255,255,.6); border-color: var(--line-strong); }
.btn-soft { background: var(--surface-2); color: var(--ink-2); }
.btn-soft:hover { background: var(--bg-deep); }
.btn-violet { background: var(--violet); color: #fff; }
.btn-danger { background: var(--rose-soft); color: var(--rose); }
.btn-sm { min-height: 29px; padding: 5px 10px; font-size: 10px; border-radius: 7px; }
.btn-lg { min-height: 44px; padding: 10px 18px; font-size: 12.5px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn-icon-only { width: 34px; padding: 0; }
.text-link { color: var(--violet); font-weight: 700; font-size: 11px; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,253,248,.84);
  box-shadow: var(--shadow-sm);
}
.panel-pad { padding: 22px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.panel-head h3 { margin: 0; font-size: 15px; letter-spacing: -.02em; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 10.5px; }
.panel-head .eyebrow { margin-bottom: 6px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 25px; }
.page-head h1 { margin: 0 0 7px; font-size: 31px; letter-spacing: -.05em; line-height: 1.15; }
.page-head p { max-width: 620px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.page-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.section-gap { margin-top: 22px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .85fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255,255,255,.45);
  color: var(--muted);
  font-size: 9.5px;
  white-space: nowrap;
}
.tag-violet { border-color: rgba(104,87,216,.18); background: var(--violet-soft); color: var(--violet); }
.tag-orange { border-color: rgba(236,123,78,.2); background: var(--orange-soft); color: var(--orange); }
.tag-green { border-color: rgba(44,138,92,.18); background: var(--green-soft); color: var(--green); }
.tag-rose { border-color: rgba(217,90,114,.18); background: var(--rose-soft); color: var(--rose); }
.tag-amber { border-color: rgba(185,128,31,.18); background: var(--amber-soft); color: var(--amber); }
.type-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 5px; font-size: 9.5px; font-weight: 800; letter-spacing: .01em; white-space: nowrap; }
.type-badge::before { content: ""; width: 4px; height: 4px; border-radius: 99px; background: currentColor; }
.type-bug { background: var(--orange-soft); color: var(--orange); }
.type-question { background: var(--blue-soft); color: var(--blue); }
.type-project { background: var(--violet-soft); color: var(--violet); }
.status-pill { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9.5px; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 99px; background: var(--amber); }
.status-pill.is-done { color: var(--green); }
.status-pill.is-done::before { background: var(--green); }
.risk-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; font-weight: 700; }
.risk-dot::before { content: ""; width: 5px; height: 5px; border-radius: 99px; }
.risk-high { color: var(--rose); }
.risk-high::before { background: var(--rose); }
.risk-medium { color: var(--amber); }
.risk-medium::before { background: var(--amber); }
.risk-low { color: var(--green); }
.risk-low::before { background: var(--green); }
.divider-line { height: 1px; margin: 17px 0; background: var(--line); }
.empty-state { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty-state b { display: block; margin-bottom: 5px; color: var(--ink); font-size: 14px; }
.empty-state p { margin: 0; font-size: 11px; }
.empty-icon { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 13px; border-radius: 14px; background: var(--bg); color: var(--faint); font-size: 20px; }
.spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(23,37,29,.16);
  border-top-color: var(--ink);
  border-radius: 99px;
  animation: spin .7s linear infinite;
}
.btn-primary .spinner { border-color: rgba(201,243,109,.3); border-top-color: var(--lime); }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { border-radius: 8px; background: linear-gradient(90deg, rgba(23,37,29,.06) 25%, rgba(255,255,255,.5) 50%, rgba(23,37,29,.06) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.loading-panel { display: grid; gap: 14px; padding: 28px; }
.loading-panel .skeleton:nth-child(1) { width: 30%; height: 22px; }
.loading-panel .skeleton:nth-child(2) { width: 100%; height: 120px; }
.loading-panel .skeleton:nth-child(3) { width: 100%; height: 120px; }

/* ------------------------------------------------------------- dashboard */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: 28px;
  min-height: 270px;
  padding: 36px 38px;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(650px 430px at 100% -20%, rgba(201,243,109,.16), transparent 65%),
    radial-gradient(500px 300px at 30% 120%, rgba(104,87,216,.2), transparent 60%),
    var(--forest);
  color: #f4f1e7;
  box-shadow: 0 22px 55px rgba(19,35,27,.16);
}
.hero::before {
  content: ">>>";
  position: absolute; right: 29%; bottom: -24px;
  color: rgba(255,255,255,.04);
  font-family: var(--mono); font-size: 180px; font-weight: 900; letter-spacing: -.14em;
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; }
.hero .eyebrow { color: var(--lime); }
.hero h1 { max-width: 680px; margin: 0 0 13px; font-size: clamp(31px, 3.2vw, 49px); font-weight: 800; letter-spacing: -.055em; line-height: 1.17; }
.hero h1 em { color: var(--lime); font-family: var(--serif); font-style: italic; }
.hero-lede { max-width: 570px; margin: 0; color: rgba(244,241,231,.58); font-size: 12.5px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 23px; }
.hero-actions .btn-ghost { border-color: rgba(255,255,255,.16); color: rgba(255,255,255,.8); }
.hero-actions .btn-ghost:hover { background: rgba(255,255,255,.08); }
.hero-panel {
  position: relative; z-index: 1;
  align-self: stretch;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  background: rgba(255,255,255,.045);
  backdrop-filter: blur(8px);
}
.hero-panel-top { display: flex; align-items: flex-start; justify-content: space-between; }
.hero-panel-top span { color: rgba(255,255,255,.45); font-family: var(--mono); font-size: 9px; letter-spacing: .12em; }
.hero-panel-top .tiny-badge { padding: 3px 7px; border-radius: 4px; background: rgba(201,243,109,.12); color: var(--lime); font-family: var(--mono); font-size: 8px; letter-spacing: .04em; }
.pulse-number { margin: 6px 0 0; font-family: var(--mono); font-size: clamp(46px, 5vw, 60px); font-weight: 800; line-height: 1; letter-spacing: -.08em; }
.pulse-number span { margin-left: 2px; color: var(--lime); font-size: 22px; }
.hero-panel p { margin: 5px 0 0; color: rgba(255,255,255,.52); font-size: 10.5px; }
.spark-wrap { margin-top: 12px; }
.spark-wrap svg { width: 100%; height: 48px; overflow: visible; }
.hero-panel-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.09); color: rgba(255,255,255,.43); font-size: 9px; }
.hero-panel-foot b { color: var(--lime); font-weight: 700; }

.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.quick-card {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,253,248,.72);
  text-align: left;
  transition: transform .18s, border .18s, background .18s;
}
.quick-card:hover { transform: translateY(-2px); border-color: var(--line-strong); background: var(--surface); }
.quick-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; background: var(--bg); font-size: 15px; }
.quick-card:nth-child(1) .quick-icon { background: var(--orange-soft); color: var(--orange); }
.quick-card:nth-child(2) .quick-icon { background: var(--blue-soft); color: var(--blue); }
.quick-card:nth-child(3) .quick-icon { background: var(--violet-soft); color: var(--violet); }
.quick-card b { display: block; font-size: 12px; }
.quick-card small { display: block; margin-top: 1px; color: var(--muted); font-size: 9.5px; }
.quick-arrow { margin-left: auto; color: var(--faint); font-size: 15px; }

.kpi-card { position: relative; overflow: hidden; padding: 17px 18px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,253,248,.78); }
.kpi-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; }
.kpi-label span:last-child { color: var(--faint); font-family: var(--mono); font-size: 8px; }
.kpi-value { margin: 7px 0 2px; font-family: var(--mono); font-size: 28px; font-weight: 800; letter-spacing: -.07em; line-height: 1.15; }
.kpi-value small { margin-left: 3px; color: var(--faint); font-family: var(--font); font-size: 10px; font-weight: 400; letter-spacing: 0; }
.kpi-sub { color: var(--muted); font-size: 9.5px; }
.kpi-sub b { color: var(--green); font-weight: 700; }
.kpi-sub b.down { color: var(--rose); }
.kpi-accent { position: absolute; right: -18px; bottom: -25px; width: 75px; height: 75px; border-radius: 99px; background: var(--lime); opacity: .12; }

.rank-list { display: flex; flex-direction: column; gap: 3px; }
.rank-row {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center; gap: 10px;
  padding: 10px 8px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .15s;
}
.rank-row:hover { background: var(--surface-2); }
.rank-index { color: var(--faint); font-family: var(--mono); font-size: 10px; }
.rank-row:first-child .rank-index { color: var(--orange); font-weight: 800; }
.rank-main { min-width: 0; }
.rank-title { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.rank-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.rank-bar { height: 4px; overflow: hidden; border-radius: 99px; background: var(--bg-deep); }
.rank-bar i { display: block; height: 100%; border-radius: 99px; background: var(--violet); }
.rank-row:nth-child(1) .rank-bar i { background: var(--orange); }
.rank-meta { color: var(--muted); font-family: var(--mono); font-size: 9px; white-space: nowrap; }
.rank-meta b { color: var(--ink); font-size: 13px; }

.highlight-list { display: flex; flex-direction: column; gap: 9px; }
.highlight-item { display: flex; gap: 10px; padding: 11px; border-radius: 10px; background: var(--surface-2); }
.highlight-icon { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 25px; border-radius: 7px; background: var(--surface); color: var(--violet); font-size: 11px; }
.highlight-item[data-tone="amber"] .highlight-icon { color: var(--amber); background: var(--amber-soft); }
.highlight-item[data-tone="green"] .highlight-icon { color: var(--green); background: var(--green-soft); }
.highlight-item[data-tone="rose"] .highlight-icon { color: var(--rose); background: var(--rose-soft); }
.highlight-item b { display: block; margin-bottom: 1px; font-size: 10.5px; }
.highlight-item p { margin: 0; color: var(--muted); font-size: 9.5px; line-height: 1.6; }

.recent-list { display: flex; flex-direction: column; }
.recent-item { display: flex; gap: 11px; padding: 13px 0; border-top: 1px solid var(--line); cursor: pointer; }
.recent-item:first-child { padding-top: 0; border-top: 0; }
.recent-item:hover .recent-title { color: var(--violet); }
.recent-avatar { padding-top: 1px; }
.recent-main { min-width: 0; flex: 1; }
.recent-top { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.recent-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-weight: 700; transition: color .15s; }
.recent-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 5px; color: var(--faint); font-size: 9px; }
.side-list { display: flex; flex-direction: column; gap: 1px; }
.side-list-item { display: flex; align-items: flex-start; gap: 9px; padding: 9px 0; border-top: 1px solid var(--line); }
.side-list-item:first-child { padding-top: 0; border-top: 0; }
.side-list-main { min-width: 0; flex: 1; }
.side-list-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; }
.side-list-main small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.side-list-action { margin-top: 4px; }

/* ------------------------------------------------------------- feed */
.feed-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 18px; }
.segmented { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,253,248,.55); }
.segmented button { border: 0; border-radius: 6px; background: transparent; padding: 6px 11px; color: var(--muted); font-size: 10.5px; font-weight: 700; }
.segmented button.is-active { background: var(--ink); color: var(--lime); }
.segmented button:disabled { cursor: not-allowed; opacity: .35; }
.toolbar-spacer { flex: 1; }
.toolbar-search { display: flex; align-items: center; gap: 6px; min-width: 170px; height: 31px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,253,248,.7); }
.toolbar-search svg { width: 13px; height: 13px; color: var(--faint); }
.toolbar-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 10.5px; }
.select-mini { height: 31px; padding: 0 25px 0 9px; border: 1px solid var(--line); border-radius: 8px; outline: 0; background: rgba(255,253,248,.7); color: var(--ink-2); font-size: 10.5px; }
.feed-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.post-card {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 210px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,253,248,.82);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .18s, border .18s, box-shadow .18s;
}
.post-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.post-card.is-pinned { border-color: rgba(236,123,78,.28); }
.post-card-top { display: flex; align-items: center; gap: 7px; }
.post-card-time { margin-left: auto; color: var(--faint); font-size: 9px; }
.pin-mark { color: var(--orange); font-size: 10px; }
.post-card h3 { margin: 12px 0 6px; font-size: 15px; font-weight: 800; letter-spacing: -.025em; line-height: 1.45; }
.post-card:hover h3 { color: var(--violet); }
.post-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.7; }
.post-code-preview { margin: 10px 0 0; padding: 9px 10px; overflow: hidden; border-radius: 8px; background: #1a2b21; color: #b9d5bf; font-family: var(--mono); font-size: 8.5px; line-height: 1.55; white-space: pre; }
.post-thumb { position: absolute; top: 14px; right: 14px; width: 55px; height: 40px; border-radius: 6px; object-fit: cover; border: 1px solid var(--line); }
.post-card.has-thumb .post-card-top { padding-right: 60px; }
.post-card-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 13px; }
.post-author { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 9px; }
.post-author b { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: 9.5px; }
.post-stats { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--faint); font-size: 8.5px; }
.post-stats span { display: inline-flex; align-items: center; gap: 3px; }
.post-stats svg { width: 10px; height: 10px; }
.ai-replied { color: var(--violet); }
.post-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.post-cluster { display: inline-flex; align-items: center; gap: 3px; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--violet); font-size: 8.5px; }
.post-cluster::before { content: "#"; opacity: .55; }
.feed-foot { display: flex; justify-content: center; margin-top: 22px; }

/* ------------------------------------------------------------- clusters */
.cluster-stats { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 17px; }
.cluster-stat { padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,253,248,.6); color: var(--muted); font-size: 9.5px; }
.cluster-stat b { margin-right: 3px; color: var(--ink); font-family: var(--mono); font-size: 15px; }
.cluster-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cluster-card {
  position: relative;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,253,248,.84);
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, border .18s;
}
.cluster-card:hover { transform: translateY(-3px); border-color: rgba(104,87,216,.28); box-shadow: var(--shadow-md); }
.cluster-card-top { display: flex; align-items: flex-start; gap: 11px; }
.cluster-rank { font-family: var(--mono); font-size: 28px; font-weight: 800; letter-spacing: -.08em; line-height: 1; color: var(--bg-deep); }
.cluster-card:first-child .cluster-rank { color: var(--orange-soft); }
.cluster-card h3 { margin: 0 0 4px; font-size: 15px; letter-spacing: -.02em; line-height: 1.35; }
.cluster-meta { color: var(--muted); font-size: 9px; }
.cluster-count { margin-left: auto; text-align: right; }
.cluster-count b { display: block; font-family: var(--mono); font-size: 23px; font-weight: 800; letter-spacing: -.06em; line-height: 1; }
.cluster-count small { color: var(--faint); font-size: 8px; }
.cluster-summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 12px 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.cluster-trend { display: flex; align-items: flex-end; gap: 4px; height: 30px; margin: 10px 0 11px; }
.cluster-trend i { flex: 1; min-height: 3px; border-radius: 2px 2px 0 0; background: var(--violet-soft); }
.cluster-trend i:last-child { background: var(--violet); }
.cluster-samples { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.cluster-sample { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: 9px; }
.cluster-sample::before { content: "↳ "; color: var(--faint); }
.cluster-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.knowledge-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.knowledge-pill { padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,253,248,.65); color: var(--ink-2); font-size: 9.5px; }
.knowledge-pill b { margin-left: 5px; color: var(--violet); font-family: var(--mono); font-size: 9px; }

/* ------------------------------------------------------------- report */
.report-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.report-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, .6fr);
  gap: 24px;
  padding: 28px 30px;
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(520px 300px at 100% 0%, rgba(201,243,109,.15), transparent 65%),
    var(--forest);
  color: #f4f1e7;
}
.report-banner::after { content: "WEEKLY"; position: absolute; right: 20px; bottom: -18px; color: rgba(255,255,255,.045); font-family: var(--mono); font-size: 80px; font-weight: 900; letter-spacing: -.08em; }
.report-banner .eyebrow { color: var(--lime); }
.report-banner h2 { margin: 0 0 10px; font-size: 27px; letter-spacing: -.04em; line-height: 1.3; }
.report-banner p { max-width: 700px; margin: 0; color: rgba(255,255,255,.58); font-size: 11.5px; line-height: 1.85; }
.report-banner-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.report-banner .btn-ghost { border-color: rgba(255,255,255,.16); color: rgba(255,255,255,.8); }
.report-side { position: relative; z-index: 1; align-self: center; padding: 16px; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: rgba(255,255,255,.04); }
.report-side-label { color: rgba(255,255,255,.4); font-family: var(--mono); font-size: 8px; letter-spacing: .12em; }
.report-side-value { margin: 5px 0 2px; color: var(--lime); font-family: var(--mono); font-size: 48px; font-weight: 800; letter-spacing: -.08em; line-height: 1; }
.report-side-value small { font-size: 16px; }
.report-side p { margin: 4px 0 0; color: rgba(255,255,255,.5); font-size: 9px; }
.report-tabs { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,253,248,.6); width: fit-content; }
.report-tabs button { border: 0; border-radius: 7px; background: transparent; padding: 7px 14px; color: var(--muted); font-size: 10.5px; font-weight: 700; }
.report-tabs button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.chart-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 16px; }
.chart-card { padding: 19px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,253,248,.8); }
.chart-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.chart-card-head h3 { margin: 0; font-size: 13px; }
.chart-card-head p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.bar-chart { display: flex; align-items: flex-end; gap: 9px; height: 150px; padding-top: 7px; }
.bar-col { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.bar-value { color: var(--muted); font-family: var(--mono); font-size: 8px; }
.bar-track { display: flex; align-items: flex-end; width: 100%; max-width: 34px; flex: 1; border-radius: 5px 5px 2px 2px; background: var(--surface-2); overflow: hidden; }
.bar-track i { width: 100%; min-height: 2px; border-radius: 5px 5px 2px 2px; background: var(--violet); transition: height .4s; }
.bar-col:nth-child(2) .bar-track i, .bar-col:nth-child(5) .bar-track i { background: var(--lime-deep); }
.bar-label { color: var(--faint); font-size: 8.5px; }
.bar-label.is-today { color: var(--ink); font-weight: 800; }
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { position: relative; width: 120px; height: 120px; flex: 0 0 120px; border-radius: 99px; }
.donut::after { content: ""; position: absolute; inset: 26px; border-radius: 99px; background: var(--surface); }
.donut-center { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center b { font-family: var(--mono); font-size: 24px; line-height: 1; letter-spacing: -.06em; }
.donut-center small { margin-top: 3px; color: var(--faint); font-size: 8px; }
.legend { display: flex; flex-direction: column; gap: 7px; min-width: 0; flex: 1; }
.legend-item { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
.legend-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 99px; }
.legend-item b { margin-left: auto; color: var(--ink); font-family: var(--mono); font-size: 9px; }
.report-table { width: 100%; border-collapse: collapse; }
.report-table th { padding: 8px 9px; border-bottom: 1px solid var(--line); color: var(--faint); font-family: var(--mono); font-size: 8px; font-weight: 600; letter-spacing: .06em; text-align: left; white-space: nowrap; }
.report-table td { padding: 11px 9px; border-bottom: 1px solid var(--line); font-size: 10px; vertical-align: middle; }
.report-table tr:last-child td { border-bottom: 0; }
.report-table tr:hover td { background: rgba(248,245,236,.7); }
.report-table .num { font-family: var(--mono); font-weight: 700; }
.trend-up { color: var(--rose); font-family: var(--mono); font-size: 9px; }
.trend-down { color: var(--green); font-family: var(--mono); font-size: 9px; }
.trend-flat { color: var(--faint); font-family: var(--mono); font-size: 9px; }
.risk-list { display: flex; flex-direction: column; gap: 1px; }
.risk-item { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-top: 1px solid var(--line); }
.risk-item:first-child { border-top: 0; padding-top: 0; }
.risk-main { min-width: 0; flex: 1; }
.risk-main b { display: block; font-size: 10.5px; }
.risk-main small { display: block; margin-top: 1px; color: var(--muted); font-size: 8.5px; }
.risk-num { color: var(--rose); font-family: var(--mono); font-size: 16px; font-weight: 800; }
.report-note { padding: 11px 13px; border-radius: 9px; background: var(--surface-2); color: var(--muted); font-size: 9.5px; line-height: 1.7; }
.report-actions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.action-card { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.action-card-top { display: flex; align-items: flex-start; gap: 8px; }
.action-check { display: grid; place-items: center; width: 16px; height: 16px; flex: 0 0 16px; margin-top: 1px; border: 1px solid var(--line-strong); border-radius: 4px; color: transparent; font-size: 9px; }
.action-card.is-done .action-check { border-color: var(--green); background: var(--green); color: #fff; }
.action-card.is-done .action-text { color: var(--faint); text-decoration: line-through; }
.action-text { font-size: 10px; font-weight: 700; line-height: 1.55; }
.action-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; padding-left: 24px; color: var(--muted); font-size: 8.5px; }
.action-metric { color: var(--violet); }
.agenda { display: flex; flex-direction: column; }
.agenda-item { display: flex; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.agenda-item:first-child { padding-top: 0; border-top: 0; }
.agenda-time { width: 45px; flex: 0 0 45px; color: var(--violet); font-family: var(--mono); font-size: 8.5px; font-weight: 700; }
.agenda-dot { position: relative; width: 8px; flex: 0 0 8px; }
.agenda-dot::before { content: ""; position: absolute; top: 5px; left: 0; width: 6px; height: 6px; border-radius: 99px; background: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.agenda-main b { display: block; font-size: 11px; }
.agenda-main p { margin: 3px 0 0; color: var(--muted); font-size: 9.5px; line-height: 1.6; }
.agenda-owner { display: inline-block; margin-top: 5px; color: var(--faint); font-size: 8.5px; }
.student-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.student-card { padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,253,248,.78); cursor: pointer; transition: transform .16s, border .16s; }
.student-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.student-card-top { display: flex; align-items: center; gap: 9px; }
.student-card-main { min-width: 0; flex: 1; }
.student-card-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.student-card-main small { display: block; margin-top: 1px; color: var(--muted); font-size: 8.5px; }
.student-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.student-metric { text-align: center; }
.student-metric b { display: block; font-family: var(--mono); font-size: 15px; line-height: 1; }
.student-metric small { display: block; margin-top: 3px; color: var(--faint); font-size: 8px; }
.student-weak { display: flex; align-items: center; gap: 4px; margin-top: 9px; color: var(--muted); font-size: 8.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-weak::before { content: "卡点"; flex: 0 0 auto; padding: 1px 4px; border-radius: 3px; background: var(--amber-soft); color: var(--amber); font-size: 7.5px; }

/* ------------------------------------------------------------- workbench */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,253,248,.8); }
.data-table { width: 100%; min-width: 880px; border-collapse: collapse; }
.data-table th { position: sticky; top: 0; z-index: 1; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--faint); font-size: 8px; font-weight: 700; letter-spacing: .05em; text-align: left; white-space: nowrap; }
.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: 10px; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { cursor: pointer; transition: background .12s; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-person { display: flex; align-items: center; gap: 8px; }
.data-person b { font-size: 10.5px; }
.data-person small { display: block; color: var(--faint); font-size: 8px; }
.meter { display: flex; align-items: center; gap: 6px; }
.meter-track { width: 52px; height: 4px; overflow: hidden; border-radius: 99px; background: var(--bg-deep); }
.meter-track i { display: block; height: 100%; border-radius: 99px; background: var(--green); }
.meter b { font-family: var(--mono); font-size: 9px; }
.workbench-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 13px; }
.switch { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9.5px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { position: relative; width: 28px; height: 16px; border-radius: 99px; background: var(--bg-deep); transition: background .15s; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 99px; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--violet); }
.switch input:checked + .switch-track::after { transform: translateX(12px); }
.workbench-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 11px 13px; border-radius: 9px; background: var(--violet-soft); color: var(--violet); font-size: 9.5px; line-height: 1.6; }

/* ------------------------------------------------------------- settings */
.settings-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 16px; }
.form-section { display: flex; flex-direction: column; gap: 14px; }
.form-section h3 { margin: 0; font-size: 14px; }
.form-section .field small { color: var(--faint); font-size: 9px; line-height: 1.6; }
.input-row { display: flex; gap: 7px; }
.input-row .input { min-width: 0; flex: 1; }
.save-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.save-state { color: var(--faint); font-size: 9px; }
.ai-status-card { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.ai-status-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--violet-soft); color: var(--violet); font-family: var(--mono); font-size: 12px; font-weight: 800; }
.ai-status-card b { display: block; font-size: 11px; }
.ai-status-card small { display: block; color: var(--muted); font-size: 9px; }
.ai-status-card .risk-dot { margin-left: auto; }
.settings-footnote { padding: 11px 12px; border: 1px dashed var(--line-strong); border-radius: 9px; color: var(--muted); font-size: 9px; line-height: 1.7; }

/* ------------------------------------------------------------- drawer / modal */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(10,18,13,.42); backdrop-filter: blur(3px); animation: fadeIn .16s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70;
  width: min(760px, 100%);
  background: var(--bg);
  box-shadow: -20px 0 70px rgba(10,18,13,.2);
  transform: translateX(0);
  animation: slideIn .22s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
}
@keyframes slideIn { from { transform: translateX(30px); opacity: .4; } }
.drawer-content { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.modal-root { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 22px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10,18,13,.5); backdrop-filter: blur(4px); }
.modal-card { position: relative; z-index: 1; width: min(760px, 100%); max-height: 92vh; overflow-y: auto; border-radius: 20px; background: var(--bg); box-shadow: var(--shadow-lg); animation: modalIn .2s cubic-bezier(.2,.8,.2,1); }
@keyframes modalIn { from { transform: translateY(12px) scale(.98); opacity: .5; } }

.post-detail { min-height: 100%; padding: 28px 30px 50px; background: var(--surface); }
.detail-topbar { display: flex; align-items: center; gap: 7px; margin-bottom: 22px; }
.detail-topbar .icon-btn { margin-left: auto; }
.detail-close { font-size: 20px; }
.detail-head .type-badge { margin-bottom: 11px; }
.detail-head h1 { margin: 0 0 12px; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.05em; line-height: 1.3; }
.detail-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.detail-byline b { color: var(--ink-2); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.detail-body { margin-top: 22px; }
.detail-body p { margin: 0 0 13px; color: var(--ink-2); font-size: 12.5px; line-height: 1.9; white-space: pre-wrap; }
.detail-image-wrap { position: relative; margin: 15px 0 19px; }
.detail-image { display: block; width: 100%; max-height: 440px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); cursor: zoom-in; }
.image-caption { margin-top: 6px; color: var(--faint); font-size: 8.5px; }
.code-block { position: relative; margin: 14px 0; border-radius: 11px; overflow: hidden; background: #1b2b22; }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 11px; border-bottom: 1px solid rgba(255,255,255,.07); color: rgba(255,255,255,.38); font-family: var(--mono); font-size: 8px; }
.copy-btn { border: 0; border-radius: 4px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.6); padding: 3px 7px; font-size: 8px; }
.copy-btn:hover { background: rgba(255,255,255,.16); color: #fff; }
.code-block pre { margin: 0; padding: 13px 14px; overflow-x: auto; color: #c8ddcd; font-family: var(--mono); font-size: 10px; line-height: 1.7; tab-size: 4; }
.error-block { margin: 13px 0; padding: 12px 14px; border-left: 3px solid var(--rose); border-radius: 0 8px 8px 0; background: var(--rose-soft); }
.error-block .eyebrow { margin-bottom: 5px; color: var(--rose); }
.error-block pre { margin: 0; overflow-x: auto; color: #8a3548; font-family: var(--mono); font-size: 9.5px; line-height: 1.7; white-space: pre-wrap; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0 4px; }
.reaction-bar { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.reaction-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); color: var(--muted); font-size: 9.5px; }
.reaction-btn:hover { border-color: var(--line-strong); }
.reaction-btn.is-active { border-color: var(--violet); background: var(--violet-soft); color: var(--violet); }
.reaction-btn .num { font-family: var(--mono); font-weight: 700; }
.ai-card { position: relative; margin: 22px 0; padding: 19px; border: 1px solid rgba(104,87,216,.18); border-radius: 14px; background: linear-gradient(135deg, rgba(238,234,255,.7), rgba(255,253,248,.75)); }
.ai-card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.ai-avatar { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px; background: var(--violet); color: #fff; font-family: var(--mono); font-size: 9px; font-weight: 800; }
.ai-card-head b { display: block; font-size: 11px; }
.ai-card-head small { display: block; color: var(--muted); font-size: 8.5px; }
.ai-card-head .btn { margin-left: auto; }
.ai-thinking { display: flex; align-items: center; gap: 8px; padding: 9px 0; color: var(--violet); font-size: 10px; }
.ai-thinking .spinner { border-color: rgba(104,87,216,.18); border-top-color: var(--violet); }
.prose { color: var(--ink-2); font-size: 11.5px; line-height: 1.85; overflow-wrap: anywhere; }
.prose h3 { margin: 17px 0 7px; color: var(--ink); font-size: 12.5px; letter-spacing: -.01em; }
.prose h3:first-child { margin-top: 0; }
.prose p { margin: 0 0 9px; }
.prose ul, .prose ol { margin: 0 0 10px; padding-left: 20px; }
.prose li { margin-bottom: 3px; }
.prose strong { color: var(--ink); }
.prose code { padding: 1px 4px; border-radius: 4px; background: rgba(104,87,216,.09); color: var(--violet); font-family: var(--mono); font-size: .93em; }
.prose pre { margin: 9px 0 12px; padding: 12px 13px; overflow-x: auto; border-radius: 8px; background: #1b2b22; color: #c8ddcd; font-family: var(--mono); font-size: 9.5px; line-height: 1.7; }
.prose pre code { padding: 0; background: transparent; color: inherit; font-size: inherit; }
.prose blockquote { margin: 9px 0 12px; padding: 8px 12px; border-left: 2px solid var(--violet); background: rgba(104,87,216,.05); color: var(--muted); font-size: 10px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 15px 0; }
.prose-invert, .prose-invert p, .prose-invert li, .prose-invert h3, .prose-invert strong { color: rgba(255,255,255,.8) !important; }
.prose-invert code { background: rgba(201,243,109,.13); color: var(--lime); }
.prose-invert pre { background: rgba(0,0,0,.25); color: #d7e6d8; }
.prose-invert blockquote { border-left-color: var(--lime); background: rgba(255,255,255,.04); color: rgba(255,255,255,.58); }
.comments-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 25px 0 6px; }
.comments-head h3 { margin: 0; font-size: 13px; }
.comment { display: flex; gap: 9px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.comment-main { min-width: 0; flex: 1; }
.comment-head { display: flex; align-items: center; gap: 7px; color: var(--faint); font-size: 8.5px; }
.comment-head b { color: var(--ink-2); font-size: 9.5px; }
.comment-body { margin-top: 3px; color: var(--ink-2); font-size: 10.5px; line-height: 1.75; white-space: pre-wrap; }
.comment-form { display: flex; gap: 8px; margin-top: 14px; }
.comment-form textarea { flex: 1; min-height: 38px; max-height: 100px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; outline: none; background: var(--surface); resize: vertical; font-size: 10.5px; }
.comment-form textarea:focus { border-color: var(--violet); }
.similar-box { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.similar-box h3 { margin: 0 0 8px; font-size: 11px; }
.similar-item { display: flex; align-items: center; gap: 7px; padding: 6px 0; color: var(--ink-2); font-size: 9.5px; cursor: pointer; }
.similar-item:hover { color: var(--violet); }
.similar-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.similar-item small { margin-left: auto; flex: 0 0 auto; color: var(--faint); font-size: 8px; }
.project-report { margin: 18px 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.project-report-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.score-ring { position: relative; display: grid; place-items: center; width: 76px; height: 76px; flex: 0 0 76px; border-radius: 99px; background: conic-gradient(var(--violet) calc(var(--score) * 1%), var(--bg-deep) 0); }
.score-ring::after { content: ""; position: absolute; inset: 7px; border-radius: 99px; background: var(--surface-2); }
.score-ring-inner { position: relative; z-index: 1; text-align: center; }
.score-ring-inner b { display: block; font-family: var(--mono); font-size: 21px; letter-spacing: -.07em; line-height: 1; }
.score-ring-inner small { color: var(--faint); font-size: 7px; }
.project-report-head h3 { margin: 0 0 4px; font-size: 13px; }
.project-report-head p { margin: 0; color: var(--muted); font-size: 9.5px; line-height: 1.6; }
.project-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 13px 0; }
.project-stat { padding: 8px; border-radius: 7px; background: var(--surface); text-align: center; }
.project-stat b { display: block; font-family: var(--mono); font-size: 14px; }
.project-stat small { color: var(--faint); font-size: 7.5px; }
.issue-list { display: flex; flex-direction: column; gap: 6px; }
.issue-item { display: flex; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.issue-severity { width: 4px; flex: 0 0 4px; border-radius: 99px; background: var(--amber); }
.issue-severity.critical { background: var(--rose); }
.issue-severity.high { background: var(--orange); }
.issue-severity.medium { background: var(--amber); }
.issue-severity.low { background: var(--faint); }
.issue-main b { display: block; font-size: 9.5px; }
.issue-main p { margin: 2px 0 0; color: var(--muted); font-size: 8.5px; line-height: 1.55; }
.issue-loc { margin-left: auto; color: var(--faint); font-family: var(--mono); font-size: 7.5px; white-space: nowrap; }
.project-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.project-col h4 { margin: 0 0 5px; color: var(--faint); font-family: var(--mono); font-size: 7.5px; letter-spacing: .08em; text-transform: uppercase; }
.project-col ul { margin: 0; padding-left: 15px; color: var(--muted); font-size: 8.5px; line-height: 1.65; }
.project-col li { margin-bottom: 3px; }

/* composer */
.composer { padding: 24px 26px 28px; }
.composer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.composer-head h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.04em; }
.composer-head p { margin: 0; color: var(--muted); font-size: 10px; }
.composer-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 18px; }
.composer-tab { display: flex; align-items: center; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); text-align: left; transition: border .15s, background .15s; }
.composer-tab:hover { border-color: var(--line-strong); }
.composer-tab.is-active { border-color: var(--ink); background: var(--ink); color: var(--lime); }
.composer-tab .tab-icon { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 25px; border-radius: 6px; background: rgba(0,0,0,.06); font-size: 11px; }
.composer-tab.is-active .tab-icon { background: rgba(255,255,255,.1); }
.composer-tab b { display: block; font-size: 10px; }
.composer-tab small { display: block; margin-top: 1px; opacity: .65; font-size: 8px; }
.composer-form { display: grid; gap: 13px; }
.composer-form .field { gap: 5px; }
.composer-form .field > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.composer-form .field > span small { color: var(--faint); font-weight: 400; }
.dropzone {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 112px;
  padding: 15px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: border .15s, background .15s;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--violet); background: var(--violet-soft); }
.dropzone-icon { margin-bottom: 5px; font-size: 21px; opacity: .6; }
.dropzone b { color: var(--ink-2); font-size: 10.5px; }
.dropzone small { margin-top: 2px; color: var(--faint); font-size: 8.5px; }
.dropzone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.image-preview { position: relative; display: inline-block; margin-top: 9px; }
.image-preview img { display: block; max-height: 150px; max-width: 100%; border: 1px solid var(--line); border-radius: 8px; }
.image-remove { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 99px; background: var(--ink); color: #fff; font-size: 11px; }
.anon-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.anon-row-text b { display: block; font-size: 10px; }
.anon-row-text small { display: block; margin-top: 1px; color: var(--muted); font-size: 8.5px; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 3px; }
.composer-note { color: var(--faint); font-size: 8.5px; line-height: 1.5; }
.form-hint { color: var(--faint); font-size: 8.5px; line-height: 1.55; margin: -4px 0 0; }

/* notifications */
.notif-panel {
  position: fixed; top: 78px; right: 26px; z-index: 75;
  width: min(370px, calc(100vw - 28px));
  max-height: min(620px, calc(100vh - 100px));
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn .18s ease;
}
.notif-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 17px 17px 11px; }
.notif-head h3 { margin: 0; font-size: 17px; letter-spacing: -.03em; }
.notif-head .eyebrow { margin-bottom: 3px; }
.notif-list { display: flex; flex-direction: column; overflow-y: auto; padding: 0 9px; }
.notif-item { display: flex; gap: 9px; padding: 11px 8px; border-top: 1px solid var(--line); cursor: pointer; }
.notif-item:hover { background: var(--surface-2); }
.notif-item:first-child { border-top: 0; }
.notif-icon { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; border-radius: 7px; background: var(--violet-soft); color: var(--violet); font-size: 10px; }
.notif-item[data-kind="attention"] .notif-icon { background: var(--rose-soft); color: var(--rose); }
.notif-item[data-kind="review"] .notif-icon { background: var(--amber-soft); color: var(--amber); }
.notif-item[data-kind="project"] .notif-icon { background: var(--blue-soft); color: var(--blue); }
.notif-main { min-width: 0; flex: 1; }
.notif-main b { display: block; font-size: 10px; line-height: 1.5; }
.notif-main p { margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 8.5px; }
.notif-main small { display: block; margin-top: 3px; color: var(--faint); font-size: 8px; }
.notif-unread { width: 5px; height: 5px; flex: 0 0 5px; margin-top: 5px; border-radius: 99px; background: var(--violet); }
.notif-panel > .btn { margin: 10px 15px 14px; }
.notif-empty { padding: 40px 20px; color: var(--muted); text-align: center; font-size: 10px; }

/* toast + lightbox */
.toast-root { position: fixed; z-index: 100; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 7px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; max-width: min(480px, calc(100vw - 30px)); padding: 9px 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; background: var(--forest); color: #f4f1e7; font-size: 10.5px; box-shadow: var(--shadow-md); animation: toastIn .2s ease; }
.toast::before { content: ""; width: 5px; height: 5px; border-radius: 99px; background: var(--lime); }
.toast.is-error::before { background: var(--rose); }
.toast.is-out { opacity: 0; transform: translateY(6px); transition: .2s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
.lightbox { position: fixed; inset: 0; z-index: 110; display: flex; align-items: center; justify-content: center; padding: 30px; background: rgba(8,15,10,.88); }
.lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.4); object-fit: contain; }
.lightbox-close { position: absolute; top: 16px; right: 20px; border: 0; background: transparent; color: #fff; font-size: 30px; line-height: 1; }

/* markdown/document print */
.print-only { display: none; }
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .app-foot, .page-head-actions, .report-tabs, .report-banner-actions, .workbench-toolbar, .feed-toolbar, .composer-foot, .scrim { display: none !important; }
  .app-main { margin-left: 0; }
  .view-root { max-width: none; padding: 0; }
  .panel, .report-banner, .chart-card { box-shadow: none; break-inside: avoid; }
  .report-banner { color: #111; background: #fff; border: 1px solid #ddd; }
  .report-banner h2, .report-banner p, .report-banner .eyebrow { color: #111; }
  .print-only { display: block; }
  .drawer { position: static !important; width: 100% !important; height: auto !important; box-shadow: none !important; background: #fff !important; animation: none !important; }
  .drawer-content { height: auto !important; overflow: visible !important; }
  .post-detail { padding: 0; }
  .detail-topbar .btn, .detail-actions, .reaction-bar, .comment-form, .similar-box, .detail-topbar .icon-btn, .ai-card .btn { display: none !important; }
  .post-detail .ai-card, .project-report { break-inside: avoid; }
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .feed-grid { grid-template-columns: 1fr; }
  .student-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .global-search { width: 185px; }
}
@media (max-width: 1020px) {
  .login-screen { grid-template-columns: 1fr 430px; }
  .login-art { padding: 38px 36px 26px; }
  .login-copy h1 { font-size: 45px; }
  .login-code-card { width: 100%; }
  .grid-2 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; align-items: center; }
  .hero-panel-top, .hero-panel p { grid-column: 1; }
  .spark-wrap { grid-column: 2; grid-row: 1 / span 3; margin: 0; }
  .hero-panel-foot { grid-column: 1 / -1; }
  .settings-grid { grid-template-columns: 1fr; }
  .cluster-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .login-screen { display: block; }
  .login-art { min-height: 0; padding: 28px 24px 34px; }
  .login-copy { padding-top: 42px; }
  .login-copy h1 { font-size: 40px; }
  .login-code-card, .login-foot, .feature-row { display: none; }
  .login-panel { min-height: 55vh; padding: 32px 24px 44px; }
  .login-panel-inner { max-width: 430px; }
  .login-mobile-brand { display: flex; }
  .sidebar {
    top: auto; right: 0; bottom: 0; left: 0;
    width: 100%; height: 66px;
    flex-direction: row; align-items: center;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid rgba(255,255,255,.08);
    z-index: 50;
  }
  .sidebar-top, .sidebar-foot { display: none; }
  .nav { flex-direction: row; width: 100%; margin: 0; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-group-label { display: none; }
  .nav-item { flex: 1 1 0; width: auto; min-width: 0; flex-direction: column; gap: 3px; padding: 7px 3px; font-size: 8px; border-radius: 8px; text-align: center; }
  .nav-item span:not(.nav-badge) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-item svg { width: 17px; height: 17px; }
  .nav-badge { position: absolute; top: 5px; right: 11px; min-width: 13px; height: 13px; line-height: 13px; font-size: 7px; }
  .app-main { margin-left: 0; padding-bottom: 78px; }
  .topbar { height: 60px; padding: 0 16px; gap: 10px; }
  .mobile-menu { display: none; }
  .global-search { display: none; }
  .week-chip { display: none; }
  .ai-pill { display: none; }
  .view-root { padding: 20px 16px 34px; }
  .app-foot { display: none; }
  .hero { padding: 26px 22px; border-radius: 21px; min-height: 0; }
  .hero h1 { font-size: 31px; }
  .hero::before { font-size: 110px; }
  .hero-panel { grid-template-columns: 1fr; }
  .spark-wrap { grid-column: 1; grid-row: auto; margin-top: 10px; }
  .quick-actions { grid-template-columns: 1fr; }
  .quick-card { padding: 12px 13px; }
  .page-head { display: block; margin-bottom: 18px; }
  .page-head h1 { font-size: 27px; }
  .page-head-actions { margin-top: 13px; }
  .report-banner { grid-template-columns: 1fr; padding: 22px; }
  .report-side { display: none; }
  .report-banner h2 { font-size: 23px; }
  .student-grid { grid-template-columns: 1fr; }
  .report-actions-grid { grid-template-columns: 1fr; }
  .post-detail { padding: 21px 18px 40px; }
  .drawer { width: 100%; }
  .composer { padding: 20px 17px 24px; }
  .composer-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .composer-tab { padding: 7px 6px; gap: 5px; }
  .composer-tab .tab-icon { width: 21px; height: 21px; flex-basis: 21px; }
  .composer-tab b { font-size: 9px; white-space: nowrap; }
  .composer-tab small { display: none; }
  .form-grid.two { grid-template-columns: 1fr; }
  .modal-root { padding: 0; align-items: flex-end; }
  .modal-card { max-height: 94vh; border-radius: 18px 18px 0 0; }
  .toast-root { bottom: 82px; }
  .notif-panel { top: 66px; right: 10px; left: 10px; width: auto; }
  .kpi-grid { gap: 9px; }
  .kpi-card { padding: 13px; }
  .kpi-value { font-size: 24px; }
  .project-cols { grid-template-columns: 1fr; }
  .donut-wrap { flex-direction: column; align-items: flex-start; }
  .report-table th, .report-table td { padding: 8px 6px; }
  .report-table { min-width: 560px; }
  .table-wrap { border-radius: 12px; }
  .detail-actions .btn { flex: 1; }
}
@media (max-width: 520px) {
  .login-copy h1 { font-size: 34px; }
  .login-panel { padding: 26px 18px 38px; }
  .demo-buttons { grid-template-columns: 1fr; }
  .hero h1 { font-size: 27px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .quick-actions { gap: 8px; }
  .feed-toolbar { gap: 6px; }
  .segmented button { padding: 6px 8px; font-size: 9.5px; }
  .post-card { padding: 15px; }
  .post-card h3 { font-size: 14px; }
  .report-tabs { width: 100%; }
  .report-tabs button { flex: 1; padding: 7px 6px; font-size: 9.5px; }
  .reaction-btn { flex: 1; justify-content: center; }
  .detail-head h1 { font-size: 23px; }
  .project-stats { grid-template-columns: 1fr 1fr; }
  .chart-card { padding: 14px; }
  .bar-chart { gap: 5px; height: 125px; }
  .notif-panel { max-height: calc(100vh - 80px); }
}

/* ==========================================================================
   简化主题：浅色、少量装饰、以内容为主
   ========================================================================== */
:root {
  --bg: #f6f5f1;
  --bg-deep: #ecebe5;
  --surface: #ffffff;
  --surface-2: #f7f7f3;
  --ink: #1f2a24;
  --ink-2: #3d4a42;
  --muted: #6f7a72;
  --faint: #9aa39c;
  --line: #e3e5df;
  --line-strong: #cfd5cd;
  --forest: #244b37;
  --forest-2: #2e5b44;
  --lime: #e4efdd;
  --lime-deep: #7ca36f;
  --violet: #3f6b55;
  --violet-soft: #edf3ee;
  --orange: #9a5f45;
  --orange-soft: #f7efe9;
  --rose: #9a4f5b;
  --rose-soft: #f8ecee;
  --blue: #4a6785;
  --blue-soft: #eef3f7;
  --green: #2f6b4f;
  --green-soft: #edf4ef;
  --amber: #8a6427;
  --amber-soft: #f8f2e5;
  --shadow-sm: none;
  --shadow-md: 0 8px 24px rgba(31, 42, 36, .07);
  --shadow-lg: 0 18px 48px rgba(31, 42, 36, .14);
  --radius: 14px;
  --radius-sm: 10px;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}
.eyebrow { display: none !important; }
h1, h2, h3, .page-head h1, .hero h1 { letter-spacing: -.025em; }

/* ---- login ---- */
.login-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 500px;
  min-height: 100vh;
  background: var(--bg);
}
.login-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 56px 64px;
}
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 70px; }
.login-logo strong { font-size: 16px; letter-spacing: .02em; }
.login-copy h1 {
  margin: 0 0 22px;
  font-size: clamp(38px, 4vw, 54px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -.04em;
}
.login-copy > p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}
.login-points {
  display: grid;
  gap: 9px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 13px;
}
.login-points li { display: flex; align-items: center; gap: 8px; }
.login-points li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}
.login-foot { margin-top: 70px; color: var(--faint); font-size: 11px; }
.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px;
  background: var(--surface);
  border-left: 1px solid var(--line);
}
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.03em; }
.login-sub { margin: 0 0 24px; color: var(--muted); font-size: 12px; }
.login-help { margin: 12px 0 0; color: var(--faint); font-size: 11px; text-align: center; }
.login-privacy { max-width: 380px; margin: 28px auto 0; color: var(--faint); font-size: 10px; text-align: center; }
.form-success {
  margin: 0;
  padding: 9px 11px;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  line-height: 1.6;
}
.register-closed {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.auth-tabs { background: var(--surface-2); border: 1px solid var(--line); }
.auth-tab { padding: 8px; }
.auth-tab.is-active { background: var(--surface); color: var(--ink); box-shadow: none; border: 1px solid var(--line); }
.field input, .field textarea, .field select, .input { border-color: var(--line); border-radius: 8px; }
.field input:focus, .field textarea:focus, .field select:focus, .input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 107, 79, .1);
}
.btn { border-radius: 8px; }
.btn-primary { background: var(--forest); color: #fff; box-shadow: none; }
.btn-primary:hover { background: var(--forest-2); }
.btn-lime { background: var(--lime); color: var(--forest); box-shadow: none; }
.btn-violet { background: var(--green); color: #fff; }
.form-grid.two { gap: 10px; }

/* ---- shell ---- */
.sidebar {
  width: 220px;
  padding: 22px 12px 16px;
  color: var(--ink);
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.sidebar-top { padding: 0 8px; }
.brand-text strong { color: var(--ink); font-size: 15px; }
.brand-text small { color: var(--faint); }
.brand .brand-mark { background: var(--green); color: #fff; }
.class-chip {
  margin-top: 20px;
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--muted);
}
.class-dot { background: var(--green); box-shadow: none; }
.nav { margin-top: 24px; gap: 2px; }
.nav-item {
  color: #5f6b63;
  font-size: 12.5px;
  padding: 9px 10px;
  border-radius: 8px;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.is-active {
  background: var(--green-soft);
  color: var(--green);
  font-weight: 600;
  box-shadow: none;
}
.nav-item.is-active .nav-badge { background: rgba(47, 107, 79, .12); }
.sidebar-foot { padding-top: 12px; }
.sidebar-user { color: var(--ink); border-radius: 8px; padding: 8px; }
.sidebar-user:hover { background: var(--surface-2); }
.sidebar-user-text b { font-size: 11.5px; }
.sidebar-user-text small { color: var(--faint); }
.sidebar-user-more { color: var(--faint); }
.app-main { margin-left: 220px; }
.topbar {
  height: 62px;
  padding: 0 28px;
  background: rgba(246, 245, 241, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.topbar-crumb { color: var(--faint); font-size: 11px; }
.topbar-crumb strong { color: var(--ink-2); font-weight: 600; }
.global-search { width: 220px; height: 34px; background: var(--surface); border: 1px solid var(--line); }
.global-search kbd { display: none; }
.week-chip { background: var(--surface); border-color: var(--line); height: 34px; }
.ai-pill { background: var(--surface); border-color: var(--line); height: 25px; }
.ai-pill.is-api { background: var(--green-soft); border-color: transparent; color: var(--green); }
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); }
.view-root { max-width: 1220px; padding: 26px 30px 46px; }
.app-foot { max-width: 1220px; padding: 18px 30px 22px; }

/* ---- content ---- */
.page-head { margin-bottom: 20px; align-items: flex-start; }
.page-head h1 { font-size: 25px; margin-bottom: 5px; }
.page-head p { font-size: 12px; max-width: 680px; }
.panel { background: var(--surface); border-color: var(--line); border-radius: 12px; box-shadow: none; }
.panel-pad { padding: 20px; }
.panel-head { margin-bottom: 14px; }
.panel-head h3 { font-size: 14px; }
.panel-head p { font-size: 10.5px; }
.kpi-grid { gap: 10px; }
.kpi-card {
  padding: 15px 16px;
  border-color: var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.kpi-value { font-size: 25px; margin: 6px 0 2px; }
.kpi-accent { display: none; }
.kpi-sub { font-size: 9.5px; }
.quick-card { background: var(--surface); border-color: var(--line); border-radius: 10px; padding: 13px 14px; }
.quick-card:hover { transform: none; border-color: var(--line-strong); }
.quick-icon { background: var(--surface-2) !important; color: var(--green) !important; }
.rank-row { padding: 9px 6px; }
.rank-bar { height: 3px; background: #edf0ea; }
.rank-bar i { background: var(--green); }
.highlight-item, .report-note, .workbench-note { background: var(--surface-2); }
.recent-item { padding: 11px 0; }
.post-card {
  border-color: var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: none;
  padding: 16px;
}
.post-card:hover { transform: none; border-color: var(--line-strong); box-shadow: none; }
.post-code-preview { background: #f3f5f1; color: #3f5147; border: 1px solid var(--line); }
.type-bug { background: var(--orange-soft); color: var(--orange); }
.type-question { background: var(--blue-soft); color: var(--blue); }
.type-project { background: var(--violet-soft); color: var(--violet); }
.feed-grid { gap: 12px; }
.segmented { background: var(--surface); }
.segmented button.is-active { background: var(--ink); color: #fff; }
.cluster-card { background: var(--surface); border-color: var(--line); border-radius: 11px; padding: 18px; }
.cluster-card:hover { transform: none; box-shadow: none; border-color: var(--line-strong); }
.cluster-rank { color: var(--line-strong); }
.cluster-card:first-child .cluster-rank { color: var(--line-strong); }
.cluster-trend i { background: #e9eee7; }
.cluster-trend i:last-child { background: var(--green); }

/* ---- flat summaries instead of dark banners ---- */
.summary-card {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.summary-card h2 { margin: 0 0 9px; font-size: 22px; line-height: 1.35; letter-spacing: -.02em; }
.summary-card > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.85; }
.summary-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.summary-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 4px;
  margin-left: auto;
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}
.summary-badge small { font-family: var(--font); font-size: 9px; font-weight: 400; }
.summary-head { display: flex; align-items: flex-start; gap: 18px; }
.summary-head > div:first-child { min-width: 0; flex: 1; }
.hero {
  min-height: 0;
  padding: 25px 27px;
  grid-template-columns: 1fr;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
}
.hero::before { display: none; }
.hero h1 { font-size: 27px; margin-bottom: 10px; }
.hero h1 em { color: var(--ink); font-family: inherit; font-style: normal; }
.hero-lede { color: var(--muted); font-size: 12px; }
.hero-actions { margin-top: 16px; }
.hero-actions .btn-ghost { border-color: var(--line); color: var(--ink-2); }
.hero-panel { display: none; }
.report-banner {
  padding: 22px 24px;
  grid-template-columns: 1fr;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.report-banner::after { display: none; }
.report-banner h2 { font-size: 22px; }
.report-banner p { color: var(--muted); font-size: 12px; }
.report-banner .btn-ghost { border-color: var(--line); color: var(--ink-2); }
.report-side {
  display: none;
}
.report-tabs { background: var(--surface); }
.report-tabs button.is-active { background: var(--ink); color: #fff; box-shadow: none; }
.chart-card { background: var(--surface); border-color: var(--line); border-radius: 10px; }
.donut::after { background: var(--surface); }
.report-table th { background: var(--surface-2); }
.data-table th { background: var(--surface-2); }
.student-card { background: var(--surface); border-color: var(--line); border-radius: 10px; }
.student-card:hover { transform: none; border-color: var(--line-strong); }
.agenda-dot::before { background: var(--green); box-shadow: none; }
.action-card, .ai-card { background: var(--surface-2); border-color: var(--line); }
.ai-card { border-radius: 10px; }
.ai-avatar { background: var(--green); }
.ai-pill.is-api i, .ai-pill i { background: var(--green); }
.ai-card .prose strong { color: var(--ink); }
.reaction-btn { background: var(--surface); }
.post-detail { background: var(--surface); padding: 24px 26px 44px; }
.detail-head h1 { font-size: 27px; }
.code-block { border-radius: 8px; }
.project-report { background: var(--surface-2); border-color: var(--line); border-radius: 10px; }

/* forms / settings */
.settings-grid { gap: 14px; }
.form-section h3, .panel-head h3 { letter-spacing: 0; }
.ai-status-card { background: var(--surface-2); border-color: var(--line); }
.form-hint { color: var(--faint); }
.switch input:checked + .switch-track { background: var(--green); }

@media (max-width: 1020px) {
  .login-screen { grid-template-columns: 1fr 430px; }
  .login-visual { padding: 40px; }
  .login-copy h1 { font-size: 40px; }
}
@media (max-width: 860px) {
  .login-screen { display: block; background: var(--surface); }
  .login-visual { padding: 30px 22px 8px; max-width: none; }
  .login-logo { margin-bottom: 26px; }
  .login-copy h1 { font-size: 34px; }
  .login-copy > p { font-size: 12.5px; }
  .login-points, .login-foot { display: none; }
  .login-panel { padding: 24px 20px 40px; border-left: 0; }
  .login-card { max-width: 430px; }
  .sidebar {
    top: auto; right: 0; bottom: 0; left: 0;
    width: 100%; height: 64px;
    flex-direction: row; align-items: center;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid var(--line);
    background: var(--surface);
  }
  .sidebar-top, .sidebar-foot { display: none; }
  .nav { flex-direction: row; width: 100%; margin: 0; gap: 2px; overflow-x: auto; }
  .nav-item { flex: 1 1 0; width: auto; min-width: 0; flex-direction: column; gap: 2px; padding: 6px 3px; font-size: 8.5px; }
  .nav-item svg { width: 17px; height: 17px; }
  .app-main { margin-left: 0; padding-bottom: 74px; }
  .topbar { height: 56px; padding: 0 14px; }
  .global-search, .week-chip, .ai-pill { display: none; }
  .view-root { padding: 18px 14px 30px; }
  .app-foot { display: none; }
  .page-head { display: block; }
  .page-head h1 { font-size: 23px; }
  .page-head-actions { margin-top: 12px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi-card { padding: 12px 13px; }
  .kpi-value { font-size: 22px; }
  .hero { padding: 20px 18px; }
  .hero h1 { font-size: 23px; }
  .summary-card { padding: 18px; }
  .summary-head { display: block; }
  .summary-badge { margin: 10px 0 0; }
  .post-detail { padding: 19px 16px 36px; }
  .detail-head h1 { font-size: 22px; }
  .modal-root { padding: 0; align-items: flex-end; }
  .modal-card { border-radius: 14px 14px 0 0; }
}

.assessment-grid {
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}
.assessment-head, .assessment-row {
  display: grid;
  grid-template-columns: 95px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 10px;
  padding: 7px 11px;
  border-bottom: 1px solid var(--line);
}
.assessment-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}
.assessment-row:last-child { border-bottom: 0; }
.assessment-row input { padding: 6px 8px; text-align: right; }
@media (max-width: 520px) {
  .assessment-head, .assessment-row { grid-template-columns: 72px minmax(0, 1fr) 70px; gap: 6px; padding: 6px 8px; }
}

.kpi-label > span:last-child { display: none; }
.report-table th { letter-spacing: 0; }
