/* ==================================================================
   尊狮 ZUNSHI · RoboMaster Team Portal
   Dark tactical / engineering console theme
   ================================================================== */

:root {
  --bg: #07090d;
  --bg-2: #0a0d13;
  --surface: #0e131b;
  --surface-2: #121924;
  --surface-3: #17202d;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #e9eef7;
  --text-2: #b9c3d3;
  --muted: #7f8b9e;
  --red: #ff4438;
  --red-2: #ff6b52;
  --amber: #ffb703;
  --cyan: #4cc9f0;
  --purple: #b388ff;
  --teal: #2dd4bf;
  --green: #3ddc97;
  --danger: #ff5a5f;
  --radius: 4px;
  --cut: 12px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --header-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::selection { background: rgba(255, 68, 56, 0.35); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.25; letter-spacing: 0.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
code, pre, kbd { font-family: var(--mono); }
strong { color: #fff; font-weight: 600; }
::placeholder { color: #5f6b7d; }

/* ---------- background ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 80%);
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 380px at 12% -5%, rgba(255, 68, 56, 0.16), transparent 65%),
    radial-gradient(700px 420px at 92% 8%, rgba(76, 201, 240, 0.09), transparent 65%),
    radial-gradient(900px 600px at 50% 110%, rgba(179, 136, 255, 0.06), transparent 70%);
}

/* ---------- layout ---------- */
.shell { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }
.site-main { min-height: 70vh; padding-bottom: 80px; }
.site-main.is-wide { padding-bottom: 0; }
.section { padding: 72px 0 0; }
.section-tight { padding-top: 44px; }
.section-alt { margin-top: 72px; padding: 64px 0; background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent); border-top: 1px solid var(--line); }
.muted { color: var(--muted) !important; }
.small { font-size: 13px; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-head .section-index { font-family: var(--mono); font-size: 12px; color: var(--red); letter-spacing: 0.2em; display: block; margin-bottom: 8px; }
.section-head .section-title { font-size: clamp(24px, 3vw, 34px); }
.section-head .section-en { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.28em; margin-top: 8px; }
.section-head .section-link { flex: none; font-family: var(--mono); font-size: 12px; color: var(--text-2); border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; }
.section-head .section-link:hover { color: var(--red); border-color: var(--red); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(7, 9, 13, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand-mark { display: grid; place-items: center; }
.brand-mark svg { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 20px; letter-spacing: 0.12em; }
.brand-text small { font-family: var(--mono); font-size: 9px; color: var(--muted); letter-spacing: 0.18em; margin-top: 3px; }
.main-nav { display: flex; align-items: center; gap: 2px; }
.nav-link {
  position: relative; padding: 10px 14px; font-size: 14px; color: var(--text-2);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.nav-link.is-active { color: #fff; }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--red); box-shadow: 0 0 12px var(--red);
}
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02);
  color: var(--text-2); border-radius: var(--radius);
}
.icon-btn:hover { color: #fff; border-color: var(--line-strong); background: rgba(255, 255, 255, 0.06); }
.icon-btn svg { width: 18px; height: 18px; }
.nav-toggle { display: none; }
.mobile-auth { display: none; }

.user-menu { position: relative; }
.user-menu summary {
  list-style: none; display: flex; align-items: center; gap: 8px;
  padding: 4px 8px 4px 4px; border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; background: rgba(255, 255, 255, 0.02);
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { border-color: var(--line-strong); }
.user-name { font-size: 13px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu .chev { width: 14px; height: 14px; transition: transform 0.2s; color: var(--muted); }
.user-menu[open] .chev { transform: rotate(180deg); }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 210px; z-index: 60;
  background: var(--surface-2); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  padding: 6px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}
.user-dropdown a, .user-dropdown button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px;
  font-size: 13px; color: var(--text-2); background: none; border: 0; text-align: left;
}
.user-dropdown a:hover, .user-dropdown button:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.user-dropdown svg { width: 16px; height: 16px; }
.ud-head { padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; }
.ud-head strong { font-size: 14px; }
.ud-head span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.ud-head + a { margin-top: 2px; }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--red); --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border: 1px solid transparent;
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: transform 0.15s, filter 0.15s, background 0.15s;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 24px rgba(255, 68, 56, 0.25); }
.btn-outline { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--red); color: #fff; background: rgba(255, 68, 56, 0.08); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); color: var(--text-2); border-color: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12px; gap: 5px; }
.btn-block { width: 100%; }
.btn.danger, .btn-ghost.danger { color: var(--danger); }
.text-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); }
.text-link svg { width: 14px; height: 14px; }
.text-link:hover { color: var(--red); }
.mini-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  color: var(--text-2); font-size: 12px; border-radius: 3px;
}
.mini-btn svg { width: 14px; height: 14px; }
.mini-btn:hover { color: #fff; border-color: var(--line-strong); background: rgba(255, 255, 255, 0.07); }
.mini-btn.danger { color: var(--danger); border-color: rgba(255, 90, 95, 0.28); }
.mini-btn.danger:hover { background: rgba(255, 90, 95, 0.12); }
.mini-link { font-size: 12px; color: var(--text-2); }
.mini-link:hover { color: var(--red); }

/* ---------- badges / tags / avatar ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  border: 1px solid var(--line-strong); color: var(--text-2); background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
}
.badge-red { color: #ff8a80; border-color: rgba(255, 68, 56, 0.4); background: rgba(255, 68, 56, 0.12); }
.badge-cyan { color: #8fe3ff; border-color: rgba(76, 201, 240, 0.4); background: rgba(76, 201, 240, 0.1); }
.badge-amber { color: #ffd166; border-color: rgba(255, 183, 3, 0.4); background: rgba(255, 183, 3, 0.1); }
.badge-purple { color: #d0b8ff; border-color: rgba(179, 136, 255, 0.4); background: rgba(179, 136, 255, 0.1); }
.badge-green { color: #8ef0c3; border-color: rgba(61, 220, 151, 0.4); background: rgba(61, 220, 151, 0.1); }
.badge-default { color: var(--text-2); }
.tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px;
  font-family: var(--mono); font-size: 11px; color: var(--text-2);
  border: 1px solid var(--line); border-radius: 2px; background: rgba(255, 255, 255, 0.02);
}
a.tag:hover { color: #fff; border-color: var(--line-strong); }
.tag-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar { border-radius: 3px; overflow: hidden; flex: none; background: var(--surface-3); }
.avatar svg { display: block; width: 100%; height: 100%; }
.group-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
  font-size: 11px; color: #fff; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 2px;
}
.group-pill::before { content: ""; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }

/* ---------- flash ---------- */
.flash-wrap { width: min(1240px, calc(100% - 48px)); margin: 18px auto 0; }
.flash {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 16px; border: 1px solid rgba(255, 68, 56, 0.35);
  background: rgba(255, 68, 56, 0.1); color: #ffc9c4; font-size: 14px;
}
.flash-ok { border-color: rgba(61, 220, 151, 0.35); background: rgba(61, 220, 151, 0.09); color: #a9f5d4; }
.flash-err { border-color: rgba(255, 90, 95, 0.4); background: rgba(255, 90, 95, 0.1); color: #ffc2c4; }
.flash-close { background: none; border: 0; color: inherit; font-size: 18px; line-height: 1; opacity: 0.7; }
.flash-close:hover { opacity: 1; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); padding: 76px 0 0; }
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; padding-bottom: 72px; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.radar { position: absolute; right: -8%; top: -12%; width: 760px; height: 760px; opacity: 0.55; }
.radar-ring { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 1px solid rgba(255, 68, 56, 0.18); border-radius: 50%; }
.radar-ring.r1 { width: 32%; height: 32%; }
.radar-ring.r2 { width: 62%; height: 62%; }
.radar-ring.r3 { width: 96%; height: 96%; }
.radar-cross { position: absolute; background: rgba(255, 68, 56, 0.14); }
.radar-cross.h { left: 0; right: 0; height: 1px; top: 50%; }
.radar-cross.v { top: 0; bottom: 0; width: 1px; left: 50%; }
.radar-sweep {
  position: absolute; inset: 2%; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(255, 68, 56, 0.22) 40deg, transparent 60deg);
  animation: sweep 7s linear infinite;
  mask-image: radial-gradient(circle, transparent 8%, #000 9%, #000 100%);
}
@keyframes sweep { to { transform: rotate(360deg); } }
.radar-blip { position: absolute; width: 7px; height: 7px; background: var(--red); border-radius: 50%; box-shadow: 0 0 14px var(--red); animation: blip 2.8s ease-in-out infinite; }
.radar-blip.b1 { left: 66%; top: 34%; }
.radar-blip.b2 { left: 40%; top: 62%; animation-delay: 1s; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); }
.radar-blip.b3 { left: 58%; top: 70%; animation-delay: 1.8s; background: var(--amber); box-shadow: 0 0 14px var(--amber); }
@keyframes blip { 0%, 100% { opacity: 0.25; transform: scale(0.7); } 50% { opacity: 1; transform: scale(1.15); } }

.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: var(--text-2); text-transform: uppercase; }
.eyebrow .dot { width: 6px; height: 6px; background: var(--red); box-shadow: 0 0 10px var(--red); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.hero-title { margin: 20px 0 20px; display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.hero-cn { font-size: clamp(64px, 9vw, 112px); line-height: 0.95; letter-spacing: 0.04em; text-shadow: 0 0 60px rgba(255, 68, 56, 0.35); }
.hero-en { font-family: var(--mono); font-size: clamp(14px, 1.6vw, 20px); letter-spacing: 0.42em; color: var(--red); }
.hero-lead { max-width: 560px; font-size: 17px; color: var(--text-2); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 36px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); max-width: 560px; }
.stat { background: var(--bg); padding: 14px 16px; }
.stat strong { display: block; font-family: var(--mono); font-size: 26px; color: #fff; line-height: 1.1; }
.stat span { font-size: 11px; color: var(--muted); letter-spacing: 0.1em; }

.hero-console { background: linear-gradient(160deg, rgba(18, 25, 36, 0.95), rgba(8, 11, 16, 0.95)); border: 1px solid var(--line-strong); box-shadow: var(--shadow); position: relative; }
.hero-console::before, .hero-console::after { content: ""; position: absolute; width: 10px; height: 10px; border: 1px solid var(--red); }
.hero-console::before { left: -4px; top: -4px; border-right: 0; border-bottom: 0; }
.hero-console::after { right: -4px; bottom: -4px; border-left: 0; border-top: 0; }
.console-top, .console-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.console-foot { border-bottom: 0; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); letter-spacing: 0.1em; }
.console-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em; color: var(--muted); }
.live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; color: var(--green); }
.live i { width: 5px; height: 5px; background: currentColor; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.console-screen { padding: 18px 16px; font-family: var(--mono); }
.console-line { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.06); font-size: 12px; }
.console-line span { color: var(--muted); letter-spacing: 0.1em; }
.console-line strong { color: var(--text); letter-spacing: 0.08em; }
.console-divider { height: 1px; background: linear-gradient(90deg, var(--red), transparent); margin: 12px 0; }
.console-status { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--green); letter-spacing: 0.12em; }
.console-status .dot { width: 6px; height: 6px; background: currentColor; border-radius: 50%; box-shadow: 0 0 10px currentColor; }
.console-coords { margin-top: 6px; font-size: 10px; color: var(--muted); letter-spacing: 0.1em; }
.hero-ticker { border-top: 1px solid var(--line); overflow: hidden; background: rgba(255, 255, 255, 0.015); }
.ticker-track { display: flex; align-items: center; gap: 26px; padding: 11px 0; white-space: nowrap; width: max-content; animation: ticker 36s linear infinite; }
.ticker-track span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: var(--muted); }
.ticker-track b { color: var(--red); font-size: 8px; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- page hero ---------- */
.page-hero { border-bottom: 1px solid var(--line); padding: 54px 0 44px; background: linear-gradient(180deg, rgba(255, 68, 56, 0.05), transparent 75%); }
.page-hero h1 { font-size: clamp(30px, 4vw, 44px); margin: 12px 0 10px; }
.page-hero p { color: var(--text-2); max-width: 720px; margin: 0; }
.page-hero-split { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb svg { width: 12px; height: 12px; opacity: 0.6; }

/* ---------- panels / cards ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { display: flex; align-items: center; gap: 9px; font-size: 16px; }
.panel-head h2 svg { width: 17px; height: 17px; color: var(--red); }
.panel-head .text-link { font-size: 12px; }
.panel-body { padding: 20px; }
.aside-card { background: var(--surface); border: 1px solid var(--line); padding: 18px; margin-bottom: 16px; }
.aside-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.aside-head svg { width: 16px; height: 16px; color: var(--red); }
.aside-head h3 { font-size: 14px; flex: 1; }
.aside-head a { font-size: 11px; color: var(--muted); }
.aside-head a:hover { color: var(--red); }
.aside-cta { display: block; position: relative; overflow: hidden; padding: 20px; border: 1px solid rgba(255, 68, 56, 0.28); background: linear-gradient(135deg, rgba(255, 68, 56, 0.12), rgba(255, 68, 56, 0.02)); }
.aside-cta:hover { border-color: rgba(255, 68, 56, 0.55); }
.aside-cta h3 { font-size: 15px; margin: 10px 0 6px; }
.aside-cta p { font-size: 12px; color: var(--text-2); margin: 0 0 12px; }
.aside-cta .ac-ico svg { width: 26px; height: 26px; color: var(--red); }
.aside-cta span { font-family: var(--mono); font-size: 11px; color: var(--red); }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.quick-card { display: block; padding: 20px; background: var(--surface); border: 1px solid var(--line); }
.quick-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.quick-card svg { width: 22px; height: 22px; color: var(--red); }
.quick-card h3 { font-size: 15px; margin: 12px 0 6px; }
.quick-card p { font-size: 12px; color: var(--muted); margin: 0; }
.empty { text-align: center; padding: 56px 20px; border: 1px dashed var(--line-strong); color: var(--muted); }
.empty-mark { font-size: 34px; margin-bottom: 10px; opacity: 0.5; }
.empty h3 { color: var(--text-2); margin-bottom: 6px; }
.empty p { font-size: 13px; margin-bottom: 14px; }

/* ---------- home news ---------- */
.news-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.news-main { min-width: 0; }
.news-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-top: 0; }
.post-featured { position: relative; display: block; padding: 34px; background: linear-gradient(140deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); overflow: hidden; min-height: 260px; }
.post-featured::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border: 1px solid rgba(255, 68, 56, 0.18); transform: rotate(45deg); }
.post-featured:hover { border-color: rgba(255, 68, 56, 0.4); }
.post-featured .post-meta { display: flex; gap: 14px; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 16px; flex-wrap: wrap; }
.post-featured h2 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 12px; max-width: 90%; }
.post-featured p { color: var(--text-2); max-width: 640px; }
.post-featured .post-date { font-family: var(--mono); }
.post-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 20px; align-items: center; padding: 20px 24px; background: var(--surface); }
.post-row:hover { background: var(--surface-2); }
.post-row-body h3 { font-size: 16px; margin-bottom: 6px; }
.post-row-body p { font-size: 12px; color: var(--muted); margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.post-row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }
.post-row .kind { font-size: 10px; }
.kind { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--red); text-transform: uppercase; }
.meeting-list { display: grid; gap: 1px; background: var(--line); margin: 0 -18px -18px; }
.meeting-item { display: grid; grid-template-columns: 54px 1fr; gap: 4px 10px; padding: 12px 18px; background: var(--surface); }
.meeting-item:hover { background: var(--surface-2); }
.meeting-date { font-family: var(--mono); font-size: 10px; color: var(--red); }
.meeting-item strong { grid-column: 2; font-size: 12.5px; font-weight: 500; line-height: 1.45; }
.meeting-item > span:last-child { grid-column: 2; font-size: 10px; color: var(--muted); }
.cat-list { display: grid; gap: 2px; margin: 0 -8px; }
.cat-list a { display: flex; align-items: center; gap: 9px; padding: 8px; font-size: 13px; color: var(--text-2); border-radius: 3px; }
.cat-list a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.cat-list em { margin-left: auto; font-family: var(--mono); font-size: 11px; font-style: normal; color: var(--muted); }
.cat-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent, var(--red)); box-shadow: 0 0 8px var(--accent, var(--red)); }

/* ---------- news page ---------- */
.news-page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.news-list-lg { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.filter-bar { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 20px; }
.filter-bar a { padding: 8px 14px; font-size: 13px; color: var(--text-2); border-radius: 2px; }
.filter-bar a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.filter-bar a.is-active { background: var(--red); color: #fff; }
.filter-bar em { font-family: var(--mono); font-size: 10px; font-style: normal; margin-left: 6px; opacity: 0.7; }

/* ---------- prose ---------- */
.prose { color: var(--text-2); font-size: 15.5px; line-height: 1.85; }
.prose-sm { font-size: 14px; line-height: 1.75; }
.prose > *:first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4 { color: #fff; margin: 1.8em 0 0.7em; scroll-margin-top: 90px; }
.prose h2 { font-size: 22px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.prose h3 { font-size: 18px; }
.prose h4 { font-size: 15px; }
.prose a { color: var(--cyan); border-bottom: 1px solid rgba(76, 201, 240, 0.35); }
.prose a:hover { border-color: var(--cyan); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 0.35em 0; }
.prose blockquote { margin: 1.4em 0; padding: 12px 18px; border-left: 2px solid var(--red); background: rgba(255, 68, 56, 0.06); color: var(--text-2); }
.prose blockquote p:last-child { margin: 0; }
.prose code { font-size: 0.88em; padding: 2px 6px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: #ffd9d4; border-radius: 2px; }
.prose pre { margin: 1.5em 0; padding: 18px; overflow-x: auto; background: #05070a; border: 1px solid var(--line); }
.prose pre code { background: none; border: 0; padding: 0; color: #cfd8e6; font-size: 13px; line-height: 1.65; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 14px; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--surface-2); color: #fff; font-weight: 600; }
.prose img { margin: 1.5em 0; border: 1px solid var(--line); }
.prose hr { margin: 2.2em 0; }
.prose .code-mini { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------- article ---------- */
.article-shell { padding-top: 36px; }
.article { max-width: 900px; margin: 0 auto; }
.article-head { margin-bottom: 28px; }
.article-kinds { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.article h1 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 16px; }
.article-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta svg { width: 14px; height: 14px; }
.article-summary { margin-top: 18px; padding: 16px 18px; border-left: 2px solid var(--red); background: rgba(255, 255, 255, 0.03); color: var(--text-2); font-size: 14px; }
.article-body { padding: 32px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.article-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; flex-wrap: wrap; }
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.article-share { display: flex; gap: 8px; }
.related { margin-top: 56px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.related-card { padding: 18px; border: 1px solid var(--line); background: var(--surface); }
.related-card:hover { border-color: var(--line-strong); }
.related-card .kind { margin-bottom: 8px; display: block; }
.related-card h3 { font-size: 15px; margin-bottom: 6px; }
.related-card span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.toc-card { padding: 18px; border: 1px solid var(--line); background: var(--surface); }
.toc-card h3 { font-size: 12px; font-family: var(--mono); letter-spacing: 0.16em; color: var(--muted); margin-bottom: 12px; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 6px 8px; font-size: 12.5px; color: var(--text-2); border-left: 1px solid var(--line); }
.toc a:hover { color: #fff; border-color: var(--red); background: rgba(255, 255, 255, 0.03); }
.toc .toc-l { padding-left: 18px; font-size: 12px; }

/* ---------- groups ---------- */
.group-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.group-grid-lg { grid-template-columns: repeat(4, 1fr); }
.group-card { position: relative; display: flex; flex-direction: column; padding: 24px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform 0.2s, border-color 0.2s; }
.group-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--accent); opacity: 0.8; }
.group-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.gc-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.gc-code { font-family: var(--mono); font-size: 40px; line-height: 1; color: color-mix(in srgb, var(--accent) 35%, transparent); font-weight: 700; }
.gc-icon { color: var(--accent); }
.gc-icon svg { width: 30px; height: 30px; }
.gc-body h3 { font-size: 22px; margin-bottom: 2px; }
.gc-en { font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; color: var(--muted); }
.gc-body p { font-size: 13px; color: var(--text-2); margin: 12px 0 14px; }
.gc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.gc-tags span { font-size: 10.5px; color: var(--text-2); padding: 2px 7px; border: 1px solid var(--line); }
.gc-link { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--accent); }
.gc-link svg { width: 13px; height: 13px; }

.group-hero { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 80%); padding: 56px 0 40px; }
.group-hero-inner { display: flex; justify-content: space-between; gap: 40px; align-items: flex-end; flex-wrap: wrap; }
.gh-mark { font-family: var(--mono); font-size: 100px; line-height: 0.8; color: color-mix(in srgb, var(--accent) 22%, transparent); }
.gh-tagline { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: var(--accent); }
.group-hero h1 { font-size: clamp(34px, 5vw, 56px); margin: 10px 0 6px; }
.gh-desc { color: var(--text-2); max-width: 640px; margin: 10px 0 0; }
.gh-focus { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.gh-focus span { font-size: 11px; padding: 3px 9px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); color: var(--text-2); }
.subteam-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.subteam-card { padding: 20px; border: 1px solid var(--line); background: var(--surface); }
.st-icon { color: var(--red); margin-bottom: 12px; }
.st-icon svg { width: 22px; height: 22px; }
.subteam-card h3 { font-size: 16px; margin-bottom: 6px; }
.st-en { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.16em; }
.subteam-card p { font-size: 12.5px; color: var(--text-2); margin: 10px 0; }
.st-skills { display: flex; flex-wrap: wrap; gap: 5px; }
.st-skills span { font-size: 10px; color: var(--text-2); border: 1px solid var(--line); padding: 2px 6px; }

/* ---------- projects ---------- */
.project-board { display: grid; gap: 40px; }
.project-group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.project-group-head h2 { font-size: 20px; }
.project-group-head .gc-code { font-size: 22px; }
.project-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.project-line { display: grid; grid-template-columns: 1fr 200px; gap: 24px; align-items: center; padding: 18px 22px; background: var(--surface); }
.project-line:hover { background: var(--surface-2); }
.pl-name { font-size: 16px; font-weight: 600; }
.pl-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.pl-owner { font-size: 11px; color: var(--muted); margin-left: 10px; }
.pl-progress { display: flex; align-items: center; gap: 10px; }
.progress { flex: 1; height: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress > span, .progress i { display: block; height: 100%; background: var(--red); box-shadow: 0 0 10px var(--red); }
.pl-progress strong { font-family: var(--mono); font-size: 12px; color: var(--text-2); width: 38px; text-align: right; }
.project-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 16px; border: 1px solid var(--line); background: var(--surface); }
.pr-main h3 { font-size: 15px; }
.pr-sub { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.pr-meta { display: flex; align-items: center; gap: 10px; }
.pr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.pf-group { font-size: 10px; color: var(--muted); }
.project-board-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 24px; flex-wrap: wrap; }

/* ---------- resources ---------- */
.resource-toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; }
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.resource-card { display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--line); background: var(--surface); position: relative; }
.resource-card:hover { border-color: var(--line-strong); }
.rc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rc-ico { color: var(--red); }
.rc-ico svg { width: 24px; height: 24px; }
.rc-kind { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; padding: 2px 6px; border: 1px solid var(--line); color: var(--muted); }
.resource-card h3 { font-size: 16px; margin-bottom: 8px; line-height: 1.4; }
.resource-card p { font-size: 12.5px; color: var(--muted); margin: 0 0 16px; flex: 1; }
.rc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 11px; color: var(--muted); font-family: var(--mono); }
.rc-cat { font-family: var(--font); font-size: 10px; color: var(--text-2); border: 1px solid var(--line); padding: 2px 7px; }
.search-big { display: flex; gap: 8px; }
.search-big input { flex: 1; height: 44px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.search-big input:focus { outline: none; border-color: var(--red); }
.search-mini input { height: 34px; padding: 0 10px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 12px; }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 12px; color: var(--text-2); letter-spacing: 0.04em; }
.field input, .field select, .field textarea, .input {
  width: 100%; padding: 10px 12px; background: #0a0e15; border: 1px solid var(--line);
  color: var(--text); border-radius: 2px; font-size: 14px; transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 68, 56, 0.1); }
.field textarea { resize: vertical; min-height: 90px; line-height: 1.65; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 4px; flex-wrap: wrap; }
.form-divider { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; }
.form-error, .form-ok { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 13px; border: 1px solid rgba(255, 90, 95, 0.4); background: rgba(255, 90, 95, 0.1); color: #ffc2c4; }
.form-error svg, .form-ok svg { width: 16px; height: 16px; flex: none; }
.form-ok { border-color: rgba(61, 220, 151, 0.35); background: rgba(61, 220, 151, 0.08); color: #a9f5d4; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.checkbox input { width: 15px; height: 15px; accent-color: var(--red); }
.inline-details summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.inline-details[open] summary { color: var(--text-2); margin-bottom: 10px; }
.upload-hint { font-size: 11px; color: var(--muted); }

/* ---------- forum ---------- */
.forum-hero { border-bottom: 1px solid var(--line); background: radial-gradient(600px 200px at 20% 0%, rgba(255, 68, 56, 0.1), transparent 70%); padding: 48px 0 36px; }
.forum-hero-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.forum-hero h1 { font-size: clamp(30px, 4vw, 42px); margin: 10px 0 8px; }
.forum-hero p { color: var(--text-2); max-width: 680px; margin: 0; }
.forum-hero-actions { display: flex; gap: 10px; }
.forum-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 28px; }
.forum-stats div { background: var(--surface); padding: 16px 20px; }
.forum-stats strong { display: block; font-family: var(--mono); font-size: 26px; }
.forum-stats span { font-size: 11px; color: var(--muted); }
.forum-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.forum-main { min-width: 0; display: grid; gap: 22px; }
.forum-cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.forum-cat { display: grid; grid-template-columns: 38px 1fr 16px; gap: 12px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--line); }
.forum-cat:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--surface-2); }
.fc-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.fc-icon svg { width: 19px; height: 19px; }
.fc-body h3 { font-size: 14.5px; margin-bottom: 2px; }
.fc-body p { font-size: 11.5px; color: var(--muted); margin: 0 0 4px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.fc-meta { font-family: var(--mono); font-size: 10px; color: var(--text-2); }
.forum-cat > svg { width: 14px; height: 14px; color: var(--muted); }
.forum-aside .join-card { padding: 20px; border: 1px solid rgba(255, 68, 56, 0.28); background: linear-gradient(135deg, rgba(255, 68, 56, 0.12), transparent); }
.join-card h3 { font-size: 15px; margin-bottom: 8px; }
.join-card p { font-size: 12px; color: var(--text-2); margin-bottom: 14px; }
.rule-list p { display: grid; grid-template-columns: 26px 1fr; gap: 6px; font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.rule-list strong { font-family: var(--mono); color: var(--red); font-size: 10px; }
.cat-bar { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); padding: 0 2px; flex-wrap: wrap; }
.thread-list { display: grid; }
.thread-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); transition: background 0.15s; }
.thread-row:last-child { border-bottom: 0; }
.thread-row:hover { background: rgba(255, 255, 255, 0.03); }
.thread-avatar .avatar { border-radius: 3px; }
.thread-title-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.thread-title-line h3 { font-size: 14.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-title-line .pin { color: var(--red); display: inline-flex; }
.thread-title-line .pin svg { width: 13px; height: 13px; }
.thread-meta { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.mini-tag { font-family: var(--mono); font-size: 10px; color: var(--text-2); }
.thread-stats { text-align: center; min-width: 46px; }
.thread-stats strong { display: block; font-family: var(--mono); font-size: 16px; color: var(--text-2); }
.thread-stats span { font-size: 9px; color: var(--muted); }
.thread-list-lg .thread-row { padding: 18px; }
.thread-shell { max-width: 1240px; }
.thread-post { background: var(--surface); border: 1px solid var(--line); }
.tp-head { padding: 24px; border-bottom: 1px solid var(--line); }
.tp-badges { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.tp-head h1 { font-size: clamp(22px, 3vw, 32px); margin-bottom: 12px; }
.tp-meta { display: flex; align-items: center; gap: 18px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.tp-meta span { display: inline-flex; align-items: center; gap: 6px; }
.tp-meta svg { width: 13px; height: 13px; }
.thread-post .prose { padding: 24px; }
.tp-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.mod-form { display: flex; gap: 6px; }
.replies { margin-top: 24px; }
.replies-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.replies-head h2 { font-size: 15px; }
.replies-head span { font-size: 11px; color: var(--muted); }
.reply { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.reply:first-of-type { border-top: 1px solid var(--line); }
.reply-body { min-width: 0; }
.reply-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12.5px; flex-wrap: wrap; }
.reply-head strong { font-size: 13.5px; }
.reply-title { font-size: 10px; color: var(--muted); border: 1px solid var(--line); padding: 1px 6px; }
.reply-head > span:not(.reply-title) { color: var(--muted); font-size: 11px; }
.reply-num { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.reply-num:hover { color: var(--red); }
.reply-empty { padding: 20px; }
.reply-form { margin-top: 24px; padding: 22px; background: var(--surface); border: 1px solid var(--line); scroll-margin-top: 90px; }
.reply-form h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 14px; }
.reply-form h2 svg { width: 17px; height: 17px; color: var(--red); }
.locked-note { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding: 14px 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.locked-note svg { width: 16px; height: 16px; }
.locked-note a { color: var(--cyan); }
.author-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; }
.author-card strong { font-size: 15px; margin-top: 8px; }
.author-card > span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.author-card p { font-size: 12px; color: var(--text-2); margin: 8px 0; }
.side-links { display: grid; gap: 2px; }
.side-links a { display: flex; align-items: center; gap: 8px; padding: 8px; font-size: 12.5px; color: var(--text-2); }
.side-links a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.side-links svg { width: 14px; height: 14px; color: var(--muted); }
.template-box { margin: 0 -18px -18px; padding: 16px 18px; background: #05070a; border-top: 1px solid var(--line); }
.template-box code { font-size: 11.5px; color: #9fb0c7; white-space: pre-wrap; line-height: 1.7; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- auth ---------- */
.auth-shell { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: 1.1fr 0.9fr; }
.auth-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 56px; background: linear-gradient(150deg, #12080a, #07090d 65%); border-right: 1px solid var(--line); }
.auth-brand-inner { position: relative; z-index: 2; }
.auth-brand h1 { font-size: clamp(36px, 4.6vw, 58px); margin: 20px 0 12px; }
.auth-brand p { color: var(--text-2); max-width: 440px; }
.auth-points { display: grid; gap: 12px; margin-top: 32px; }
.auth-points div { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); }
.auth-points svg { width: 16px; height: 16px; color: var(--red); flex: none; margin-top: 4px; }
.auth-watermark { position: absolute; right: -40px; bottom: -50px; font-family: var(--mono); font-size: 190px; font-weight: 700; letter-spacing: -0.04em; color: rgba(255, 255, 255, 0.025); z-index: 0; }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 430px; }
.auth-card-head { margin-bottom: 24px; }
.auth-card-head h2 { font-size: 26px; margin-bottom: 6px; }
.auth-card-head p { font-size: 13px; color: var(--muted); }
.auth-card .auth-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.auth-switch { font-size: 13px; color: var(--muted); text-align: center; margin-top: 18px; }
.auth-switch a { color: var(--cyan); }
.auth-note { margin-top: 18px; padding: 12px; border: 1px dashed var(--line-strong); font-size: 11.5px; color: var(--muted); text-align: center; }
.auth-done { text-align: center; padding: 20px 0; }
.auth-done .auth-icon { width: 64px; height: 64px; margin: 0 auto 20px; display: grid; place-items: center; color: var(--green); border: 1px solid rgba(61, 220, 151, 0.4); background: rgba(61, 220, 151, 0.08); border-radius: 50%; }
.auth-done .auth-icon svg { width: 30px; height: 30px; }
.auth-done h1 { font-size: 26px; margin-bottom: 10px; }
.auth-done p { color: var(--text-2); font-size: 14px; }
.auth-done .btn { margin-top: 18px; }

/* ---------- me ---------- */
.me-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.me-card { padding: 24px; border: 1px solid var(--line); background: var(--surface); text-align: center; }
.me-avatar { display: grid; place-items: center; margin-bottom: 14px; }
.me-card h2 { font-size: 20px; }
.me-username { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.me-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 12px 0; }
.me-bio { font-size: 12.5px; color: var(--text-2); margin: 10px 0 16px; }
.me-meta { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 16px; text-align: left; }
.me-meta div { display: flex; justify-content: space-between; padding: 8px 12px; background: var(--surface-2); font-size: 11.5px; }
.me-meta span { color: var(--muted); }
.me-main { display: grid; gap: 20px; }

/* ---------- search ---------- */
.search-results { display: grid; gap: 26px; margin-top: 28px; }
.search-group h2 { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); font-family: var(--mono); letter-spacing: 0.12em; margin-bottom: 10px; }
.search-hit { display: block; padding: 14px 16px; border: 1px solid var(--line); border-bottom: 0; background: var(--surface); }
.search-hit:last-child { border-bottom: 1px solid var(--line); }
.search-hit:hover { background: var(--surface-2); }
.search-hit h3 { font-size: 14.5px; margin-bottom: 4px; }
.search-hit p { font-size: 12px; color: var(--muted); margin: 0; }
.search-hit .hit-kind { font-family: var(--mono); font-size: 9px; color: var(--red); margin-right: 8px; }
.search-suggest { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- pagination ---------- */
.pagination { display: flex; gap: 5px; justify-content: center; margin-top: 28px; flex-wrap: wrap; align-items: center; }
.pagination a, .pagination .current, .pagination span.page-arrow {
  min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 10px; border: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--text-2);
}
.pagination a:hover { border-color: var(--line-strong); color: #fff; background: rgba(255, 255, 255, 0.04); }
.pagination .current { background: var(--red); border-color: var(--red); color: #fff; }
.pagination .disabled { opacity: 0.3; pointer-events: none; }
.page-arrow svg { width: 14px; height: 14px; }

/* ---------- admin ---------- */
.admin-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); }
.admin-side { border-right: 1px solid var(--line); background: rgba(10, 13, 19, 0.7); padding: 26px 14px; position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); display: flex; flex-direction: column; }
.admin-side-head { padding: 0 12px 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.admin-side-head span { font-family: var(--mono); font-size: 9px; letter-spacing: 0.24em; color: var(--red); }
.admin-side-head strong { display: block; font-size: 17px; margin-top: 2px; }
.admin-nav { display: grid; gap: 2px; }
.admin-nav-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 13px; color: var(--text-2); border-left: 2px solid transparent; }
.admin-nav-link svg { width: 16px; height: 16px; color: var(--muted); }
.admin-nav-link:hover { background: rgba(255, 255, 255, 0.04); color: #fff; }
.admin-nav-link.is-active { background: rgba(255, 68, 56, 0.1); color: #fff; border-left-color: var(--red); }
.admin-nav-link.is-active svg { color: var(--red); }
.admin-back { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 12px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.admin-back:hover { color: #fff; }
.admin-back svg { width: 15px; height: 15px; }
.admin-main { padding: 32px 36px 64px; min-width: 0; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.admin-head h1 { font-size: 26px; }
.admin-head p { color: var(--muted); font-size: 12.5px; margin: 4px 0 0; }
.admin-head-actions { display: flex; gap: 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card { padding: 18px; border: 1px solid var(--line); background: var(--surface); }
.stat-card span { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); }
.stat-card span svg { width: 14px; height: 14px; color: var(--red); }
.stat-card strong { display: block; font-family: var(--mono); font-size: 30px; margin: 6px 0 2px; }
.stat-card em { font-size: 10.5px; color: var(--muted); font-style: normal; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 24px; }
.admin-list { display: grid; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.admin-row:last-child { border-bottom: 0; }
a.admin-row:hover { background: rgba(255, 255, 255, 0.03); }
.admin-row strong { display: block; font-size: 13px; }
.admin-row span { display: block; font-size: 11px; color: var(--muted); }
.admin-row svg { width: 14px; height: 14px; color: var(--muted); }
.admin-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.admin-row form { display: flex; gap: 6px; flex: none; }
.admin-quick { display: flex; gap: 8px; flex-wrap: wrap; padding: 16px 20px; border-top: 1px solid var(--line); }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); margin: 0 -1px; }
.info-grid div { padding: 14px 20px; background: var(--surface); display: flex; flex-direction: column; gap: 3px; }
.info-grid span { font-size: 10.5px; color: var(--muted); }
.info-grid strong { font-family: var(--mono); font-size: 11.5px; color: var(--text-2); word-break: break-all; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.data-table th { font-size: 10.5px; color: var(--muted); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; background: rgba(255, 255, 255, 0.02); white-space: nowrap; }
.data-table td { color: var(--text-2); }
.data-table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.data-table a:hover { color: var(--cyan); }
.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row-actions form { display: inline; }
.users-table .badge { margin-right: 4px; }
.admin-form { max-width: 980px; }
.admin-form .panel-body { padding: 24px; }
.admin-form .form-actions { display: flex; gap: 10px; align-items: center; padding-top: 8px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: rgba(6, 8, 12, 0.8); padding: 52px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 36px; padding-bottom: 40px; }
.footer-brand p { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; max-width: 320px; }
.footer-col h3 { font-size: 12px; font-family: var(--mono); letter-spacing: 0.16em; color: var(--text-2); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 12.5px; color: var(--muted); padding: 4px 0; }
.footer-col a:hover { color: #fff; }
.footer-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); flex-wrap: wrap; }

/* ---------- error ---------- */
.error-shell { text-align: center; padding: 100px 0; }
.error-code { font-family: var(--mono); font-size: clamp(80px, 14vw, 160px); line-height: 1; color: rgba(255, 68, 56, 0.22); font-weight: 700; letter-spacing: -0.04em; }
.error-shell h1 { font-size: 26px; margin: 4px 0 10px; }
.error-shell p { color: var(--muted); font-size: 13px; }
.error-shell .hero-actions { justify-content: center; }

/* ---------- misc ---------- */
.search-suggest .tag { cursor: default; }
.server-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 28px; }
.server-state { padding: 16px 20px; background: var(--surface); display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-2); }
.server-state .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.server-state strong { font-family: var(--mono); font-size: 11px; margin-left: auto; color: var(--muted); }
.repo-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.repo-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); font-size: 13px; }
.repo-item:hover { background: var(--surface-2); }
.repo-ico { color: var(--red); display: inline-flex; }
.repo-ico svg { width: 16px; height: 16px; }
.repo-item span { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.org-tree { display: grid; gap: 10px; }
.org-banner { padding: 18px; border: 1px solid var(--line-strong); background: var(--surface-2); }
.org-banner h3 { font-family: var(--mono); font-size: 15px; }
.org-branches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.org-node { padding: 14px; border: 1px solid var(--line); background: var(--surface); }
.org-node strong { display: block; font-family: var(--mono); font-size: 12px; margin-bottom: 8px; }
.org-sub { display: flex; flex-wrap: wrap; gap: 4px; }
.org-sub span { font-size: 9.5px; color: var(--text-2); border: 1px solid var(--line); padding: 1px 5px; }
.org-actions { margin-top: 8px; }
.info-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.info-list div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 14px; background: var(--surface); font-size: 12px; }
.info-list span { color: var(--muted); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ==================================================================
   Responsive
   ================================================================== */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-console { max-width: 520px; }
  .radar { right: -30%; opacity: 0.35; }
  .news-layout, .forum-layout, .news-page-grid { grid-template-columns: 1fr; }
  .news-aside, .forum-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  .news-aside > *, .forum-aside > * { margin-bottom: 0; }
  .group-grid-lg { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-grid .footer-col:last-child { grid-column: 1 / -1; }
  .admin-shell { grid-template-columns: 200px minmax(0, 1fr); }
  .admin-main { padding: 26px 24px 56px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .org-branches { grid-template-columns: repeat(2, 1fr); }
  .me-grid { grid-template-columns: 260px minmax(0, 1fr); }
}

@media (max-width: 980px) {
  .shell { width: calc(100% - 32px); }
  .header-inner { gap: 12px; }
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0; display: none;
    flex-direction: column; align-items: stretch; gap: 0; padding: 10px 16px 16px;
    background: rgba(8, 11, 16, 0.98); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .main-nav.is-open { display: flex; }
  .nav-link { padding: 12px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); clip-path: none; }
  .nav-link.is-active::after { display: none; }
  .nav-link.is-active { color: var(--red); }
  .mobile-auth { display: flex; gap: 10px; padding-top: 12px; }
  .mobile-auth a { flex: 1; text-align: center; padding: 9px; border: 1px solid var(--line); font-size: 13px; }
  .nav-toggle { display: grid; }
  .user-name { display: none; }
  .hero { padding-top: 52px; }
  .hero-title { gap: 10px; }
  .hero-cta, .hero-actions { margin: 22px 0 28px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .group-grid, .group-grid-lg, .subteam-grid, .forum-cats, .related-grid { grid-template-columns: 1fr; }
  .project-line { grid-template-columns: 1fr; gap: 10px; }
  .form-row { grid-template-columns: 1fr; }
  .news-aside, .forum-aside { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; flex-direction: column; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-side-head { display: none; }
  .admin-nav { grid-template-columns: repeat(2, 1fr); }
  .admin-back { margin-top: 10px; border-top: 0; }
  .admin-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .article-body { padding: 24px 0; }
  .post-row { grid-template-columns: 1fr; gap: 8px; }
  .post-row-meta { flex-direction: row; align-items: center; }
  .me-grid { grid-template-columns: 1fr; }
  .me-card { text-align: left; }
  .me-avatar { justify-content: flex-start; }
  .me-badges { justify-content: flex-start; }
  .forum-stats { grid-template-columns: repeat(2, 1fr); }
  .server-strip { grid-template-columns: 1fr; }
  .org-branches { grid-template-columns: 1fr; }
  .auth-form-wrap { padding: 36px 16px; }
  .section { padding-top: 52px; }
  .footer-bottom { font-size: 10px; }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  .brand-text small { display: none; }
  .brand-text strong { font-size: 18px; }
  .hero-cn { font-size: 64px; }
  .hero-en { font-size: 12px; letter-spacing: 0.3em; }
  .hero-lead { font-size: 15px; }
  .hero-console { display: none; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .post-featured { padding: 22px; }
  .post-row { padding: 16px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .forum-cat { grid-template-columns: 32px 1fr; }
  .forum-cat > svg { display: none; }
  .thread-row { grid-template-columns: 34px minmax(0, 1fr); }
  .thread-stats { display: none; }
  .tp-head, .thread-post .prose, .tp-foot { padding: 16px; }
  .reply { padding: 14px; }
  .admin-main { padding: 20px 14px 44px; }
  .admin-nav { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .article h1 { font-size: 26px; }
  .data-table th, .data-table td { padding: 9px 10px; }
  .search-big { flex-direction: column; }
  .project-board-head { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- view-specific additions ---------- */
.post-date { font-family: var(--mono); text-align: center; color: var(--muted); }
.post-date strong { display: block; font-size: 20px; color: var(--text); line-height: 1.1; }
.post-date span { font-size: 10px; letter-spacing: 0.1em; }
.post-featured h3 { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 10px; max-width: 92%; color: #fff; }
.pf-glow { position: absolute; right: -80px; bottom: -100px; width: 300px; height: 300px; background: radial-gradient(circle, rgba(255,68,56,.22), transparent 65%); pointer-events: none; }
.pf-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.pf-group { font-family: var(--font); color: var(--text-2); }
.pf-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-family: var(--mono); font-size: 11px; color: var(--red); letter-spacing: .06em; }
.pf-link svg { width: 14px; height: 14px; }
.row-arrow { color: var(--muted); display: inline-flex; }
.row-arrow svg { width: 16px; height: 16px; }
.post-row:hover .row-arrow { color: var(--red); }

.hero-copy { min-width: 0; }
.gh-copy { flex: 1; min-width: 0; }
.gh-mark svg { width: 46px; height: 46px; display: block; margin-top: 8px; }
.group-card-lg { padding: 30px; }
.group-card-lg .gc-code { font-size: 58px; }
.group-card-lg .gc-body h3 { font-size: 26px; }
.group-card-lg .gc-body p { font-size: 14px; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.content-main { display: grid; gap: 20px; min-width: 0; }
.content-aside { min-width: 0; }
.content-aside .aside-card:last-child { margin-bottom: 0; }
.forum-preview { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.news-page-main { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.news-page-main .post-featured { border: 0; }
.news-page-main .post-row { border: 0; }

.project-group { margin: 0; scroll-margin-top: 92px; }
.project-group + .project-group { margin-top: 12px; }
.pg-code { font-family: var(--mono); font-size: 24px; font-weight: 700; color: color-mix(in srgb, var(--accent, var(--red)) 55%, transparent); }
.project-group-head { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.project-group-head h2 { font-size: 20px; }
.project-group .project-list { border-top: 0; }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; font-size: 12.5px; color: var(--text-2); border: 1px solid transparent; border-radius: 2px; }
.tab:hover { background: rgba(255,255,255,.05); color: #fff; }
.tab.is-active { background: rgba(255,68,56,.14); border-color: rgba(255,68,56,.35); color: #fff; }
.tab em { font-family: var(--mono); font-size: 10px; font-style: normal; opacity: .65; }

.kind-news { color: var(--red); }
.kind-meeting { color: var(--amber); }
.kind-notice { color: var(--cyan); }
.badge-ok { color: #8ef0c3; border-color: rgba(61,220,151,.4); background: rgba(61,220,151,.1); }
.badge-danger { color: #ffb3b5; border-color: rgba(255,90,95,.4); background: rgba(255,90,95,.1); }

.qc-icon { color: var(--red); display: inline-flex; }
.quick-card > svg:last-child { margin-left: auto; color: var(--muted); width: 16px; height: 16px; }
.quick-card { display: flex; align-items: flex-start; gap: 12px; }
.quick-card .qc-icon svg { width: 22px; height: 22px; }
.quick-card h3 { margin: 0 0 4px; }
.quick-card p { margin: 0; }

.ss-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); }
.ss-item > span { color: var(--red); display: inline-flex; }
.ss-item svg { width: 18px; height: 18px; }
.ss-item small { display: block; font-size: 10px; color: var(--muted); }
.ss-item strong { display: block; font-family: var(--mono); font-size: 12px; color: var(--text); }

.thread-main { min-width: 0; }
.reply-avatar { padding-top: 2px; }
.reply-avatar .avatar { border-radius: 3px; }
.toc-l2 { padding-left: 8px; }
.toc-l3 { padding-left: 20px; font-size: 12px; }
.login-note { justify-content: flex-start; }
.breadcrumb.light { color: var(--muted); }
.breadcrumb.light a:hover { color: #fff; }
.icon.inline, svg.inline { width: 12px; height: 12px; display: inline-block; vertical-align: -1px; }
.top { display: none; }

.auth-page { overflow: hidden; }
.auth-page .site-main { padding-bottom: 0; }
.auth-page .site-footer { display: none; }
.auth-page .shell { width: 100%; }

@media (max-width: 1100px) {
  .content-grid, .forum-preview { grid-template-columns: 1fr; }
  .content-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
}
@media (max-width: 860px) {
  .content-aside { grid-template-columns: 1fr; }
  .post-date { text-align: left; }
  .post-date strong, .post-date span { display: inline; }
}
.logo { display: block; }
.pr-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.pr-top .project-group { font-size: 10px; font-weight: 600; letter-spacing: .06em; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); padding: 2px 7px; }
.pr-main p { font-size: 12px; color: var(--muted); margin: 6px 0 0; }

/* access control */
.public-lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  text-align: center;
}
.public-lock .qc-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--accent, #ff4438);
  background: color-mix(in srgb, var(--accent, #ff4438) 14%, transparent);
}
.public-lock h2, .public-lock h3 { margin: 0; }
.public-lock p { max-width: 560px; color: var(--muted); line-height: 1.7; }
.public-lock .hero-actions { margin-top: 6px; }
.vis-tag {
  font-style: normal;
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  color: var(--muted);
}

/* ---------- accessibility & interaction polish ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
main:focus { outline: none; }
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 200;
  padding: 10px 16px; background: var(--text); color: var(--bg);
  font-weight: 700; border-radius: var(--radius);
  transform: translateY(-160%); transition: transform 0.18s ease;
}
.skip-link:focus { transform: translateY(0); }
.flash { align-items: flex-start; }
.flash span { flex: 1; }
.flash-close:focus-visible { outline-offset: 1px; }
.user-menu summary:focus-visible { outline-offset: 2px; }
.btn:focus-visible, .icon-btn:focus-visible, .mini-btn:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.nav-toggle[aria-expanded="true"] { color: #fff; border-color: var(--red); background: rgba(255, 68, 56, 0.12); }
@media (max-width: 860px) {
  .main-nav.is-open { animation: nav-drop 0.18s ease-out; }
  body.nav-open { overflow: hidden; }
}
@keyframes nav-drop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .skip-link, .main-nav.is-open { transition: none; animation: none; }
}
.project-board > .empty { grid-column: 1 / -1; margin: 6px 0 0; }
.forum-preview .thread-list > .empty { background: var(--surface); border: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* DSH 审计 */
.audit-hero .panel-head { margin-bottom: 8px; }
.audit-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.audit-stats > div { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: rgba(255,255,255,.02); }
.audit-stats strong { display: block; font-size: 22px; color: var(--text); line-height: 1.2; }
.audit-stats span { font-size: 12px; color: var(--muted); }
.audit-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 13px; }
.audit-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.audit-meta code { font-size: 12px; color: var(--cyan); }
.audit-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.audit-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1 1 420px; }
.audit-filter input[type="search"], .audit-filter select { min-width: 150px; flex: 1 1 180px; }
.audit-exports { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.audit-table td:first-child { max-width: 320px; }
.audit-table td:first-child a { display: flex; flex-direction: column; gap: 2px; }
.audit-table .mono { font-size: 11px; }
.audit-ws { display: inline-block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: rtl; text-align: left; }
.audit-detail-meta { margin-top: 10px; }
.audit-timeline { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.audit-event { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }
.ae-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.ae-head time { margin-left: auto; color: var(--muted); font-size: 11px; }
.ae-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.audit-event-user { border-left: 3px solid var(--red); }
.audit-event-user .ae-dot { background: var(--red); }
.audit-event-assistant { border-left: 3px solid var(--cyan); }
.audit-event-assistant .ae-dot { background: var(--cyan); }
.audit-event-tool, .audit-event-result, .audit-event-command { border-left: 3px solid var(--amber); }
.audit-event-tool .ae-dot, .audit-event-result .ae-dot, .audit-event-command .ae-dot { background: var(--amber); }
.audit-event-error { border-left: 3px solid var(--danger); }
.audit-event-error .ae-dot { background: var(--danger); }
.audit-event pre { margin: 0; padding: 12px; max-height: 420px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 12px; line-height: 1.55; color: var(--text-2); }
.audit-event .ae-text { padding: 12px; font-size: 14px; line-height: 1.75; color: var(--text-2); word-break: break-word; }
.audit-context { border-style: dashed; }
.audit-context summary { padding: 9px 12px; cursor: pointer; color: var(--muted); font-size: 12px; }
.audit-context pre { border-top: 1px solid var(--line); max-height: 260px; }
@media (max-width: 860px) {
  .audit-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-table { min-width: 760px; }
}

/* 参赛记录 */
.records-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; }
.records-stats > div { border: 1px solid var(--line); border-radius: 12px; padding: 18px 16px; background: linear-gradient(160deg, rgba(255,68,56,.08), rgba(255,255,255,.015)); }
.records-stats strong { display: block; font-family: var(--mono); font-size: 34px; line-height: 1; color: var(--text); }
.records-stats span { display: block; margin-top: 7px; font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.records-stats > div:nth-child(2) strong { color: var(--amber); }
.records-stats > div:nth-child(3) strong { color: var(--cyan); }
@media (max-width: 860px) {
  .records-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 小文件 / 大文件双通道上传 */
.panel-sub { margin: 0; padding: 12px 20px 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.upload-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 20px 2px; }
.upload-choice { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); text-decoration: none; transition: border-color .18s, background .18s; }
.upload-choice:hover { border-color: var(--line-strong); color: var(--text); }
.upload-choice.is-active { border-color: var(--red); background: rgba(255, 68, 56, .08); color: var(--text); box-shadow: inset 3px 0 0 var(--red); }
.uc-ico { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); color: var(--red); background: rgba(255, 68, 56, .06); }
.uc-ico svg { width: 17px; height: 17px; }
.uc-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.uc-body strong { font-size: 13px; color: var(--text); }
.uc-body small { font-size: 11px; color: var(--muted); line-height: 1.5; }
.upload-choice > svg { width: 15px; height: 15px; margin-left: auto; color: var(--muted); flex: none; }
.field-hint { margin: -6px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
.upload-hint { display: flex; align-items: flex-start; gap: 12px; margin-top: 26px; padding: 16px 18px; border: 1px solid var(--line); background: linear-gradient(140deg, rgba(255, 68, 56, .06), rgba(255, 255, 255, .012)); color: var(--text-2); font-size: 13px; }
.upload-hint .uh-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; color: var(--amber); border: 1px solid var(--line); }
.upload-hint .uh-icon svg { width: 16px; height: 16px; }
.upload-hint strong { display: block; color: var(--text); font-size: 14px; margin-bottom: 4px; }
.upload-hint p { margin: 0; line-height: 1.75; color: var(--muted); }
.upload-hint b { color: var(--text-2); font-weight: 600; }
.upload-hint a { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--red); font-size: 12px; }
.upload-hint a svg { width: 13px; height: 13px; }
@media (max-width: 760px) {
  .upload-choices { grid-template-columns: 1fr; padding: 14px 16px 2px; }
  .upload-hint { padding: 14px; }
}
