:root {
  --ink: #192f30;
  --muted: #697e7c;
  --line: #e1e9e6;
  --paper: #fff;
  --bg: #f6f8f6;
  --accent: #147d6e;
  --soft: #e9f4ed;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 14px;
}
button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #b2ddcc;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 14px;
  white-space: nowrap;
}
.primary:hover {
  background: #106355;
  color: #fff;
}
.kb-header {
  height: 78px;
  border-bottom: 1px solid var(--line);
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #ffffffed;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}
.kb-brand {
  font-size: 23px;
  letter-spacing: -0.8px;
  color: var(--ink);
  font-weight: 750;
  white-space: nowrap;
}
.kb-brand:hover {
  text-decoration: none;
}
.kb-brand span {
  color: var(--accent);
}
.kb-brand small {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 1px;
  border-left: 1px solid #bdcfca;
  margin-left: 20px;
  padding-left: 20px;
}
.kb-header nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
}
.kb-header nav > a {
  color: var(--muted);
}
.kb-layout {
  display: grid;
  grid-template-columns: 245px minmax(0, 850px) 210px;
  justify-content: center;
  max-width: 1500px;
  margin: auto;
  min-height: calc(100vh - 78px);
}
.kb-sidebar {
  border-right: 1px solid var(--line);
  padding: 40px 24px;
  position: sticky;
  top: 78px;
  height: calc(100vh - 78px);
}
.sidebar-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1.8px;
  margin-bottom: 18px;
}
.doc-link {
  display: block;
  font-size: 14px;
  line-height: 1.7;
  padding: 12px;
  border-radius: 7px;
  color: var(--ink);
  margin-bottom: 6px;
}
.doc-link.active {
  background: var(--soft);
  color: var(--accent);
  font-weight: 600;
}
.sidebar-tip {
  margin-top: 52px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-size: 13px;
  line-height: 1.8;
}
.sidebar-tip p {
  color: var(--muted);
}
.sidebar-tip button {
  font-size: 12px;
  background: transparent;
}
.kb-main {
  padding: 38px 54px 0;
  background: var(--paper);
  min-width: 0;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb span {
  padding: 0 12px;
  color: #bac9c4;
}
.doc-title {
  padding: 46px 0 26px;
}
.eyebrow {
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 2px;
  font-weight: 600;
}
.doc-title h1 {
  font-weight: 650;
  font-size: 36px;
  letter-spacing: -1px;
  line-height: 1.35;
  margin: 14px 0 18px;
}
.doc-title p {
  font-size: 12px;
  color: var(--muted);
}
.doc-title p span {
  padding: 0 10px;
}
.doc-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 25px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 38px;
}
.search-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  flex: 1;
}
.search-label input {
  width: 100%;
  background: none;
  border: 0;
  outline: 0;
  padding: 10px 0;
  font-size: 13px;
}
.doc-tools > span {
  font-size: 11px;
  color: var(--muted);
}
.doc-tools button {
  font-size: 12px;
  white-space: nowrap;
}
.prose {
  font-size: 15px;
  line-height: 1.95;
  overflow-wrap: anywhere;
  color: #30443f;
}
.prose h1,
.prose h2,
.prose h3 {
  color: var(--ink);
  line-height: 1.6;
  scroll-margin-top: 110px;
  font-weight: 650;
}
.prose h1 {
  font-size: 22px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin: 48px 0 22px;
}
.prose h2 {
  font-size: 20px;
  margin: 34px 0 16px;
}
.prose h3 {
  font-size: 17px;
  margin: 28px 0 14px;
}
.prose > h1:first-child {
  font-size: 18px;
  background: #fff8ee;
  border: 1px solid #efdfbd;
  border-left: 3px solid #c78a2f;
  border-radius: 6px;
  padding: 18px 22px;
  line-height: 1.8;
  margin-top: 0;
}
.prose p {
  margin: 14px 0;
}
.prose img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 24px auto;
}
.prose img[src$=".jpg"] {
  max-height: 360px;
  object-fit: contain;
}
.prose ul,
.prose ol {
  padding-left: 25px;
}
.prose li {
  padding: 3px 0;
}
.prose li p {
  margin: 5px 0;
}
.prose pre {
  background: #182c2b;
  color: #e4f3eb;
  position: relative;
  overflow: auto;
  border-radius: 9px;
  padding: 25px 20px;
  font-size: 13px;
  line-height: 1.7;
  margin: 22px 0;
}
.prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border: 0;
  white-space: pre;
}
.prose code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
  background: #eef2f0;
  border: 1px solid #dfe8e3;
  border-radius: 4px;
  color: #226d59;
  padding: 2px 5px;
  overflow-wrap: anywhere;
}
.copy-code {
  position: absolute;
  right: 8px;
  top: 8px;
  background: #2c4642;
  border-color: #3e5b57;
  color: #d7e6e0;
  padding: 4px 8px;
  font-size: 11px;
}
.prose table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 13px;
}
.prose th,
.prose td {
  border: 1px solid #d7e2dc;
  padding: 14px;
  vertical-align: top;
  min-width: 70px;
}
.prose th {
  background: #f0f5f1;
  text-align: left;
}
.prose blockquote {
  border-left: 3px solid #aad2bd;
  background: #f6f9f5;
  margin: 20px 0;
  padding: 8px 20px;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 38px 0;
}
.prose a {
  border-bottom: 1px solid #afcfc0;
}
.search-hit {
  background: #fcecb1;
  scroll-margin: 140px;
}
.kb-toc {
  padding: 48px 24px;
  position: sticky;
  top: 78px;
  height: calc(100vh - 78px);
  overflow: auto;
}
.kb-toc a {
  font-size: 11px;
  line-height: 1.8;
  display: block;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding: 5px 0 5px 14px;
  overflow-wrap: anywhere;
}
.kb-toc a:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.kb-toc .toc-sub {
  padding-left: 22px;
}
.kb-toc .back-top {
  border: 0;
  margin-top: 28px;
  padding-left: 0;
}
.doc-help {
  margin: 64px 0 36px;
  padding: 28px;
  background: #eef5ef;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.doc-help h2 {
  font-size: 18px;
  margin: 0 0 9px;
}
.doc-help p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.8;
}
.kb-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.admin-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  max-width: 1680px;
  margin: auto;
}
.admin-sidebar {
  position: sticky;
  top: 78px;
  height: calc(100vh - 78px);
  border-right: 1px solid var(--line);
  padding: 32px 20px;
}
.tab {
  width: 100%;
  border: 0;
  text-align: left;
  background: transparent;
  margin: 5px 0;
  padding: 14px;
}
.tab.active {
  background: var(--soft);
  color: var(--accent);
}
.badge {
  background: #cf5c40;
  color: white;
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 10px;
  min-width: 18px;
  text-align: center;
}
.admin-main {
  padding: 24px 46px;
  min-width: 0;
}
.workspace-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin: 15px 0 32px;
}
.workspace-heading h1 {
  font-size: 28px;
  font-weight: 650;
  margin: 12px 0;
}
.workspace-heading p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  margin: 0;
}
.status-line {
  min-height: 23px;
  font-size: 13px;
  color: var(--accent);
  line-height: 1.7;
}
.status-line.error {
  color: #b74432;
}
.editor-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  margin-bottom: 18px;
}
.editor-switch select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px;
  margin-left: 8px;
  max-width: 400px;
  background: white;
  color: var(--ink);
}
.editor-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: clip;
}
.title-input {
  width: 100%;
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
  padding: 32px 34px;
  border: 0;
  border-bottom: 1px solid var(--line);
  outline: none;
}
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 12px 20px;
  background: #fbfcfa;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 78px;
  z-index: 3;
}
.editor-toolbar button {
  font-size: 12px;
  padding: 5px 8px;
  border-color: transparent;
  background: transparent;
}
.editor-toolbar button:hover {
  background: var(--soft);
}
#editor .tiptap {
  padding: 28px 40px;
  min-height: 500px;
  outline: none;
}
.editor-bottom {
  position: sticky;
  bottom: 0;
  background: #f6f8f6f5;
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
}
.quiet {
  border: 0;
  background: transparent;
  font-size: 12px;
  color: var(--muted);
}
.action-row {
  display: flex;
  gap: 10px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 30px;
  max-width: 650px;
  width: calc(100vw - 32px);
  max-height: 80vh;
  overflow: auto;
  color: var(--ink);
}
dialog::backdrop {
  background: #10292270;
  backdrop-filter: blur(4px);
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
dialog h2 {
  font-size: 20px;
}
dialog p {
  font-size: 13px;
  color: var(--muted);
}
.history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  font-size: 12px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.locked {
  max-width: 600px;
  margin: 15vh auto;
  padding: 35px;
  line-height: 1.9;
}
.locked h1 {
  font-size: 28px;
  margin-top: 36px;
}
.locked p {
  color: var(--muted);
}
.locked .primary {
  margin-top: 20px;
}
.empty {
  padding: 30px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}
.support-layout {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  height: calc(100vh - 285px);
  min-height: 450px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: white;
}
.conversation-list {
  border-right: 1px solid var(--line);
  overflow: auto;
}
.conversation {
  display: flex;
  position: relative;
  flex-direction: column;
  gap: 9px;
  text-align: left;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 20px;
  background: white;
  overflow-wrap: anywhere;
}
.conversation.selected {
  background: var(--soft);
  box-shadow: 3px 0 var(--accent) inset;
}
.conversation > span {
  font-size: 11px;
  color: var(--muted);
}
.conversation small {
  font-size: 10px;
  color: var(--muted);
}
.conversation .badge {
  position: absolute;
  top: 18px;
  right: 12px;
}
.support-room {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.conversation-heading {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
#reply-state {
  font-size: 12px;
  color: #a74435;
  padding: 0 20px;
}
#admin-email {
  font-size: 11px;
  color: var(--muted);
}
@media (min-width: 1550px) {
  .kb-layout {
    grid-template-columns: 255px minmax(0, 900px) 230px;
  }
  .kb-main {
    padding-left: 65px;
    padding-right: 65px;
  }
}
@media (max-width: 1150px) {
  .kb-layout {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  .kb-toc {
    display: none;
  }
  .kb-main {
    padding: 30px 40px 0;
  }
  .admin-main {
    padding: 20px 26px;
  }
  .support-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .kb-header {
    height: 66px;
    padding: 0 18px;
  }
  .kb-brand {
    font-size: 20px;
  }
  .kb-brand small {
    display: none;
  }
  .kb-header nav {
    gap: 12px;
    font-size: 11px;
  }
  .kb-header button {
    font-size: 11px;
    padding: 8px;
  }
  .kb-layout {
    display: block;
  }
  .kb-sidebar {
    display: none;
  }
  .kb-main {
    padding: 24px 22px 0;
  }
  .doc-title {
    padding: 32px 0 15px;
  }
  .doc-title h1 {
    font-size: 28px;
  }
  .prose {
    font-size: 14px;
  }
  .prose h1 {
    font-size: 20px;
  }
  .prose > h1:first-child {
    font-size: 16px;
    padding: 15px;
  }
  .prose pre {
    font-size: 12px;
    padding: 24px 14px;
  }
  .prose td,
  .prose th {
    padding: 10px;
  }
  .doc-tools {
    gap: 5px;
  }
  .doc-tools button {
    padding: 8px;
  }
  .doc-help {
    padding: 22px;
    align-items: start;
    flex-direction: column;
  }
  .admin-layout {
    display: block;
  }
  .admin-sidebar {
    position: static;
    height: auto;
    display: flex;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 16px;
    gap: 10px;
  }
  .admin-sidebar > .sidebar-label,
  .admin-sidebar > .sidebar-tip {
    display: none;
  }
  .tab {
    width: auto;
    margin: 0;
    padding: 10px;
  }
  .admin-main {
    padding: 14px 16px;
  }
  .workspace-heading {
    align-items: start;
  }
  .workspace-heading h1 {
    font-size: 23px;
  }
  .workspace-heading .primary {
    font-size: 12px;
    padding: 10px;
  }
  .workspace-heading p {
    font-size: 12px;
  }
  .editor-switch {
    align-items: start;
    flex-direction: column;
  }
  .editor-switch select {
    max-width: 240px;
  }
  .title-input {
    padding: 24px 20px;
    font-size: 23px;
  }
  .editor-toolbar {
    top: 66px;
    padding: 8px;
  }
  .editor-toolbar button {
    font-size: 11px;
    padding: 5px;
  }
  #editor .tiptap {
    padding: 20px;
    min-height: 420px;
  }
  .editor-bottom {
    flex-wrap: wrap;
  }
  .editor-bottom .action-row {
    margin-left: auto;
  }
  .support-layout {
    display: flex;
    flex-direction: column;
    height: 75vh;
  }
  .conversation-list {
    height: 155px;
    flex-shrink: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .conversation {
    padding: 12px 18px;
    gap: 5px;
  }
  .support-room {
    flex: 1;
    min-height: 0;
  }
  #admin-email {
    display: none;
  }
  .prose pre .copy-code {
    font-size: 10px;
  }
  .kb-footer {
    padding-bottom: 80px;
  }
  .doc-tools #search-count {
    max-width: 70px;
  }
}
