:root {
  --bg: #f7f7f5;
  --panel: #ffffff;
  --text: #222831;
  --muted: #667085;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --green: #1f9d72;
  --green-dark: #16835e;
  --green-soft: #eaf7f1;
  --ink-soft: #344054;
  --code-bg: #f2f4f7;
  --warning: #8a6116;
  --shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0;
}

a {
  color: var(--green-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
textarea,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 56px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.topbar.no-brand {
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 700;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.brand-text {
  font-size: 17px;
}

.topnav {
  display: flex;
  min-width: 0;
  flex: 1;
  gap: 18px;
  overflow: hidden;
  white-space: nowrap;
}

.topnav a {
  color: var(--ink-soft);
  font-size: 14px;
}

.topbar-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text) !important;
  font-size: 17px !important;
  font-weight: 800;
}

.topbar-logo:hover {
  text-decoration: none;
}

.profile-topbar {
  background: #242528;
  border-bottom-color: #3a3b42;
}

.profile-topbar .topnav {
  display: flex;
}

.profile-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f2f4f7 !important;
  font-size: 17px !important;
  font-weight: 800;
}

.profile-brand:hover {
  text-decoration: none;
}

.profile-topbar .button.ghost {
  border-color: #3f414a;
  background: transparent;
  color: #f2f4f7;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 36px;
}

.top-search input {
  width: 0;
  min-width: 0;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  outline: 0;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  opacity: 0;
  transition: width 0.18s ease, padding 0.18s ease, border-color 0.18s ease, opacity 0.12s ease;
}

.top-search.open input,
.top-search:focus-within input {
  width: min(260px, 32vw);
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  opacity: 1;
}

.top-search .icon-button {
  border-color: var(--line-strong);
  background: #fff;
}

.top-search .ui-icon {
  width: 16px;
  height: 16px;
}

.button,
.icon-button,
.account-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.button {
  padding: 7px 13px;
  font-weight: 650;
}

.button.primary {
  background: var(--green);
  color: #fff;
}

.button.primary:hover {
  background: var(--green-dark);
  text-decoration: none;
}

.button.ghost {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink-soft);
}

.button.danger {
  border-color: #f1c2c2;
  background: #fff;
  color: #b42318;
}

.button.wide {
  width: 100%;
}

.icon-button {
  width: 36px;
  background: transparent;
  color: var(--ink-soft);
}

.icon-button.bordered {
  border-color: #555761;
  color: #f2f4f7;
}

.icon-button:hover,
.button.ghost:hover,
.account-chip:hover,
.button.danger:hover {
  border-color: var(--line-strong);
  background: #f9fafb;
  text-decoration: none;
}

.button.copy-done,
.icon-button.copy-done {
  border-color: #b7e4c7;
  background: #effaf4;
  color: #157347;
}

.icon-button.copy-done {
  width: auto;
  min-width: 64px;
  padding: 0 10px;
}

.account-chip {
  gap: 8px;
  max-width: 190px;
  padding: 4px 10px;
  border-color: var(--line);
  background: #fff;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-chip span,
.author-mini span,
.profile-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 800;
}

.account-chip span,
.author-mini span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 820px) 280px;
  gap: 28px;
  width: min(1180px, calc(100% - 40px));
  margin: 28px auto 72px;
  align-items: start;
}

.page-grid.single {
  grid-template-columns: minmax(0, 920px);
  justify-content: center;
}

.main-pane,
.side-pane {
  min-width: 0;
}

.home-head,
.profile-head,
.workspace-head,
.featured-note,
.article,
.editor-form,
.empty-state.large {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.home-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
  gap: 24px;
  align-items: center;
  padding: 30px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.28;
  letter-spacing: 0;
}

.home-head h1,
.profile-head h1,
.editor-head h1 {
  font-size: 30px;
}

.home-head p,
.profile-head p,
.featured-note p,
.article-head p,
.side-box p,
.empty-state p {
  color: var(--muted);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
}

.page-grid.single.home-grid {
  width: min(1240px, calc(100% - 40px));
  grid-template-columns: minmax(0, 1fr);
}

.home-page {
  display: grid;
  gap: 24px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 20px;
  align-items: stretch;
}

.home-hero-copy,
.home-featured-wrap,
.home-side-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.04);
}

.home-hero-copy {
  padding: 34px;
}

.home-hero-copy h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: 34px;
}

.home-hero-copy > p {
  max-width: 760px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16px;
}

.home-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 590px);
  height: 48px;
  padding: 0 14px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #fff;
}

.home-search-box > span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  color: #64748b;
}

.home-search-box > span .ui-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.home-search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  padding: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 15px;
}

.home-search-box input:focus {
  box-shadow: none;
}

.home-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.home-stats a,
.home-stats > span {
  display: grid;
  min-width: 126px;
  gap: 1px;
  padding: 10px 12px;
  border: 1px solid #d7e8df;
  border-radius: 7px;
  background: #fbfdfb;
  color: var(--text);
}

.home-stats a:hover {
  text-decoration: none;
  border-color: var(--green);
}

.home-stats strong {
  font-size: 18px;
}

.home-stats span span,
.home-stats a span {
  color: var(--muted);
  font-size: 12px;
}

.home-featured-wrap {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.home-section-kicker {
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
}

.home-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}

.home-feed {
  min-width: 0;
}

.home-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.home-section-head h2 {
  font-size: 23px;
}

.home-section-head > span {
  color: var(--muted);
  font-size: 13px;
}

.home-note-list {
  display: grid;
  gap: 12px;
}

.home-note-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.home-note-card:hover {
  border-color: var(--line-strong);
}

.home-note-card.featured {
  border-color: #d3e9dd;
  background: #fcfefd;
}

.home-note-main {
  display: block;
  padding: 18px 20px 8px;
  color: var(--text);
}

.home-note-main:hover {
  text-decoration: none;
}

.home-note-date {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.home-note-card h2 {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.34;
}

.home-note-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  padding: 0 20px 10px;
  color: var(--muted);
  font-size: 13px;
}

.home-note-meta .ui-icon {
  width: 16px;
  height: 16px;
  margin-right: 4px;
  vertical-align: -3px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.home-author-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-weight: 700;
}

.home-author-chip span {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
}

.home-note-tags,
.home-note-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 12px;
}

.home-note-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid #d9e9e0;
  border-radius: 999px;
  background: #f6fbf8;
  color: #2b6a54;
  font-size: 12px;
}

.home-note-links {
  padding-bottom: 16px;
  font-size: 13px;
}

.home-note-links a {
  color: #4b6f91;
}

.home-sidebar {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 76px;
}

.home-side-panel {
  padding: 18px;
}

.home-side-panel h2 {
  margin-bottom: 12px;
  font-size: 16px;
}

.home-author-list,
.home-entry-list {
  display: grid;
  gap: 8px;
}

.home-author-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 7px;
  border-radius: 7px;
  color: var(--text);
}

.home-author-row:hover {
  background: #f4f7f5;
  text-decoration: none;
}

.home-author-row span:nth-child(2) {
  min-width: 0;
}

.home-author-row strong,
.home-author-row em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-author-row em,
.home-author-row small {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.home-entry-list a,
.home-entry-list button {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.home-entry-list a:hover,
.home-entry-list button:hover {
  border-color: var(--green);
  text-decoration: none;
}

.home-entry-list span {
  color: var(--muted);
  font-size: 13px;
}

.home-more-link {
  margin-top: 14px;
}

.featured-note {
  margin-top: 16px;
  padding: 24px 28px;
  border-left: 4px solid var(--green);
}

.featured-note h2 {
  font-size: 22px;
}

.note-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.note-card {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.note-card.compact {
  padding: 16px 18px;
}

.note-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
}

.note-card:hover {
  border-color: var(--line-strong);
}

.note-title {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 20px;
  font-weight: 750;
  line-height: 1.35;
}

.note-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.note-meta,
.article-meta,
.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid #cfe7dc;
  border-radius: 999px;
  background: var(--green-soft);
  color: #25694f;
  font-size: 12px;
}

.side-box {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.side-box.sticky {
  position: sticky;
  top: 76px;
}

.side-box h2 {
  margin-bottom: 10px;
  font-size: 15px;
}

.side-box p {
  margin: 6px 0;
  font-size: 14px;
}

.plain-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.plain-list li {
  margin: 6px 0;
}

.profile-head {
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 32px;
}

.workspace-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 28px 30px;
}

.workspace-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.profile-featured {
  margin-bottom: 16px;
}

.profile-avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  font-size: 30px;
}

.profile-avatar.small {
  width: 42px;
  height: 42px;
  font-size: 18px;
}

.profile-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: calc(100vh - 56px);
  background: #242528;
}

.profile-sidebar {
  min-height: calc(100vh - 56px);
  padding: 44px 22px;
  border-right: 1px solid #3a3b42;
  background: #242528;
  color: #f2f4f7;
}

.profile-sidebar .profile-avatar.large {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  background: var(--green);
  color: #fff;
  font-size: 24px;
}

.profile-sidebar h1 {
  margin-bottom: 2px;
  font-size: 17px;
}

.profile-handle,
.profile-bio,
.profile-side-section p,
.joined-line {
  color: #b7bac4;
}

.profile-handle {
  margin: 0 0 4px;
  font-size: 13px;
}

.profile-bio {
  margin: 0 0 20px;
}

.profile-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 18px;
  color: #cfd2dc;
  font-size: 13px;
}

.profile-counts strong {
  color: #fff;
}

.profile-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
}

.profile-action-row .icon-button.bordered,
.profile-share-toggle {
  width: 40px;
  border-color: #555761;
  color: #f2f4f7;
}

.profile-share-wrap {
  position: relative;
}

.profile-share-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  width: 204px;
  overflow: hidden;
  border: 1px solid #555761;
  border-radius: 4px;
  background: #2f3037;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
}

.profile-share-menu::before {
  position: absolute;
  top: -6px;
  right: 16px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  border-left: 1px solid #555761;
  border-top: 1px solid #555761;
  background: #2f3037;
  content: "";
}

.profile-share-menu button,
.profile-share-menu a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 43px;
  padding: 0 16px;
  border: 0;
  border-top: 1px solid #464852;
  background: transparent;
  color: #f2f4f7;
  cursor: pointer;
  font-size: 14px;
  font-weight: 720;
  text-align: left;
  text-decoration: none;
}

.profile-share-menu button:first-child,
.profile-share-menu a:first-child {
  border-top: 0;
}

.profile-share-menu button:hover,
.profile-share-menu a:hover {
  background: #3b3d46;
  color: #ffffff;
  text-decoration: none;
}

.profile-share-menu .ui-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.profile-share-letter {
  display: inline-grid;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  place-items: center;
  color: #d9dde7;
  font-size: 16px;
  font-weight: 850;
  line-height: 1;
}

.profile-side-section {
  margin-top: 18px;
}

.profile-side-section h2 {
  margin: 0 0 8px;
  color: #d6d8e1;
  font-size: 13px;
}

.profile-side-section p {
  margin: 0;
  font-size: 13px;
}

.custom-links-section.compact {
  margin: 16px 0 18px;
}

.custom-link-list {
  display: grid;
  gap: 8px;
}

.custom-link-list a {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #555761;
  border-radius: 5px;
  color: #f2f4f7;
  overflow-wrap: anywhere;
}

.custom-link-list a:hover {
  border-color: #6b6e79;
  background: #34363d;
  text-decoration: none;
}

.joined-line {
  margin-top: 24px;
  font-size: 12px;
}

.profile-main {
  min-width: 0;
  background: #242528;
  color: #f2f4f7;
}

.profile-tabs {
  display: flex;
  height: 56px;
  align-items: end;
  gap: 22px;
  padding: 0 24px;
  border-bottom: 1px solid #3a3b42;
}

.profile-tabs button {
  height: 56px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #c9ccd6;
  cursor: pointer;
}

.profile-tabs button.active {
  border-color: #fff;
  color: #fff;
}

.profile-tabs button span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: #5b5d68;
  color: #fff;
  font-size: 12px;
}

.public-notes-board {
  padding: 28px 24px 64px;
}

.profile-reward-panel {
  padding: 42px 24px 64px;
}

.public-notes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 36px;
  margin-bottom: 22px;
  border-bottom: 1px solid #666873;
}

.public-notes-head h2 {
  align-self: stretch;
  display: flex;
  align-items: center;
  margin: 0;
  border-bottom: 1px solid #f2f4f7;
  font-size: 15px;
  font-weight: 700;
}

.public-notes-tools {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.public-notes-tools .button.ghost {
  border-color: #555761;
  background: transparent;
  color: #f2f4f7;
}

.profile-tool-button,
.profile-sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid #555761;
  border-radius: 5px;
  background: transparent;
  color: #f2f4f7;
  cursor: pointer;
}

.profile-tool-button {
  width: 38px;
  padding: 0;
}

.profile-sort-button {
  gap: 8px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 760;
}

.profile-tool-button:hover,
.profile-sort-button:hover {
  border-color: #747782;
  background: #303139;
}

.profile-tool-button .ui-icon,
.profile-sort-button .ui-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.profile-sort-button .ui-icon:last-child {
  width: 14px;
  height: 14px;
}

.profile-sort-wrap {
  position: relative;
}

.profile-sort-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  min-width: 132px;
  overflow: hidden;
  border: 1px solid #555761;
  border-radius: 6px;
  background: #2c2d31;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.profile-sort-menu::before {
  position: absolute;
  top: -6px;
  right: 18px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  border-left: 1px solid #555761;
  border-top: 1px solid #555761;
  background: #2c2d31;
  content: "";
}

.profile-sort-menu button {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-top: 1px solid #474951;
  background: transparent;
  color: #f2f4f7;
  cursor: pointer;
  font-size: 14px;
  font-weight: 760;
  text-align: left;
}

.profile-sort-menu button:first-child {
  border-top: 0;
}

.profile-sort-menu button:hover,
.profile-sort-menu button.active {
  background: #393b43;
  color: #ffffff;
}

.profile-sort-menu button.active::after {
  margin-left: auto;
  color: var(--green);
  content: "✓";
}

.profile-search-row {
  margin: -10px 0 16px;
}

.profile-search-row input {
  width: 100%;
  border: 1px solid #555761;
  border-radius: 6px;
  padding: 10px 12px;
  background: #2c2d31;
  color: #f2f4f7;
  outline: 0;
}

.boost-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 18px;
  align-items: center;
  margin: 20px 24px;
  padding: 24px;
  border: 1px solid #575184;
  border-radius: 8px;
  background: #302d52;
}

.boost-panel p {
  margin: 0 0 12px;
  color: #fff;
}

.boost-art {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 8px;
  height: 94px;
}

.boost-art span {
  display: block;
  width: 54px;
  height: 52px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #6e65d8, #3b3768);
}

.boost-art span:nth-child(2) {
  height: 70px;
}

.profile-note-list {
  display: grid;
  gap: 12px;
  padding: 0;
}

.profile-note-list .note-card {
  border-color: #3a3b42;
  background: #2c2d31;
}

.profile-note-list .note-title {
  color: #f2f4f7;
}

.profile-note-list .note-card p,
.profile-note-list .note-meta {
  color: #b7bac4;
}

.public-note-card {
  border: 1px solid #555761;
  border-radius: 6px;
  background: #292a2f;
}

.public-note-card:hover {
  border-color: #6a6d78;
}

.public-note-link {
  display: block;
  padding: 18px 20px 8px;
  color: #f2f4f7;
}

.public-note-link:hover {
  text-decoration: none;
}

.public-note-date {
  display: block;
  margin-bottom: 8px;
  color: #aeb2be;
  font-size: 12px;
}

.public-note-card h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 20px;
  line-height: 1.25;
}

.public-note-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #d8dae2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.55;
}

.public-note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 20px 16px;
  color: #c9ccd6;
  font-size: 13px;
}

.public-note-stats,
.public-note-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.public-note-share-wrap {
  position: relative;
}

.public-note-share-menu {
  top: auto;
  right: 0;
  bottom: calc(100% + 8px);
}

.public-note-share-menu::before {
  top: auto;
  right: 13px;
  bottom: -6px;
  transform: rotate(225deg);
}

.public-note-icon,
.public-note-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  padding: 0 8px;
  background: transparent;
  color: #e5e7ef;
  font: inherit;
}

.public-note-icon {
  cursor: pointer;
}

.public-note-icon:hover {
  background: #3a3b42;
  color: #ffffff;
}

.public-note-icon.active {
  background: rgba(239, 68, 68, 0.14);
  color: #ff8a8a;
}

.public-note-icon.is-loading {
  opacity: 0.68;
  pointer-events: none;
}

.public-note-icon .ui-icon,
.public-note-view .ui-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.public-note-view {
  color: #e5e7ef;
}

.profile-empty.inline {
  min-height: 120px;
}

.profile-empty {
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 48px 24px;
  text-align: center;
}

.public-profile-empty.visitor {
  min-height: calc(100vh - 108px);
  border: 0;
  background: transparent;
}

.profile-empty h2 {
  margin-top: 18px;
  font-size: 18px;
}

.profile-empty p {
  color: #c9ccd6;
}

.empty-illustration {
  display: grid;
  width: 110px;
  height: 76px;
  place-items: center;
  border: 2px solid #7369d8;
  border-radius: 8px;
  color: #9188f0;
  font-size: 40px;
}

.settings-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
  background: #242528;
  color: #f2f4f7;
}

.settings-nav {
  padding: 30px 20px;
  border-right: 1px solid #4a4b53;
}

.settings-nav p {
  margin: 0 0 12px 16px;
  color: #aeb2be;
  font-size: 13px;
}

.settings-nav a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 5px;
  color: #f2f4f7;
}

.settings-nav a:hover,
.settings-nav a.active {
  background: #41424b;
  text-decoration: none;
}

.settings-main {
  position: relative;
  width: min(760px, calc(100% - 40px));
  padding: 28px 0 64px;
  margin: 0 auto;
}

.settings-main h1 {
  margin-bottom: 18px;
  font-size: 24px;
}

.settings-close {
  position: absolute;
  top: 22px;
  right: 0;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #f2f4f7;
  cursor: pointer;
  font-size: 28px;
}

.settings-card {
  display: grid;
  gap: 18px;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid #555761;
  border-radius: 6px;
  background: #303139;
}

.settings-card h2 {
  font-size: 20px;
}

.settings-card label {
  display: grid;
  gap: 8px;
  color: #f2f4f7;
  font-weight: 700;
}

.settings-card input,
.settings-card textarea {
  width: 100%;
  border: 1px solid #5b5d68;
  border-radius: 5px;
  padding: 10px 12px;
  background: #2b2c33;
  color: #f2f4f7;
  outline: 0;
}

.settings-card input:focus,
.settings-card textarea:focus {
  border-color: #6f63ff;
  box-shadow: 0 0 0 3px rgba(111, 99, 255, 0.18);
}

.settings-card input:disabled {
  color: #8f93a0;
  cursor: not-allowed;
}

.avatar-edit-row {
  position: relative;
  width: fit-content;
}

.avatar-edit-button {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: grid !important;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #5b5d68;
  border-radius: 50%;
  background: #2b2c33;
  cursor: pointer;
}

.avatar-edit-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.settings-help {
  margin: -8px 0 0;
  color: #aeb2be;
  font-size: 12px;
}

.settings-main > section.settings-card {
  display: none;
}

.custom-links-card textarea {
  min-height: 138px;
  resize: vertical;
}

.form-actions.right {
  justify-content: flex-end;
}

.read-page {
  min-height: 100vh;
  background: #f7f7f5;
}

.read-hover-toc {
  position: fixed;
  top: 46px;
  bottom: 0;
  left: 0;
  z-index: 35;
  width: 40px;
}

.read-hover-toc:hover,
.read-hover-toc:focus-within {
  width: 302px;
}

.read-toc-rail {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 10px;
  width: 40px;
  height: 100%;
  padding-top: 20px;
  overflow-y: auto;
  border-right: 1px solid #d9dde5;
  background: #ffffff;
  scrollbar-width: none;
}

.read-toc-rail::-webkit-scrollbar {
  display: none;
}

.read-toc-rail span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #d6d8df;
  transition: width 0.16s ease, height 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.read-toc-rail span.active {
  width: 20px;
  height: 48px;
  border-radius: 4px;
  background: linear-gradient(180deg, #6f5cff 0 14%, #f0f1f5 14% 100%);
  box-shadow: inset 0 0 0 1px #e1e3ea;
}

.read-toc-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 40px;
  width: 262px;
  overflow-y: auto;
  transform: translateX(-16px);
  opacity: 0;
  pointer-events: none;
  border-right: 1px solid #d9dde5;
  background: #ffffff;
  box-shadow: 8px 0 18px rgba(16, 24, 40, 0.08);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.read-hover-toc:hover .read-toc-panel,
.read-hover-toc:focus-within .read-toc-panel {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.read-toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 18px 0 16px;
  color: #222631;
  font-size: 16px;
  font-weight: 800;
}

.read-toc-head button {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #555f70;
  cursor: pointer;
  font-size: 16px;
}

.read-toc-links {
  display: grid;
  gap: 2px;
  padding: 0 8px 28px 11px;
}

.read-toc-link {
  display: block;
  padding: 8px 10px 8px 18px;
  border-left: 2px solid transparent;
  color: #4f5868;
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
}

.read-toc-link:hover {
  background: #f3f4f7;
  color: #222631;
  text-decoration: none;
}

.read-toc-link.active {
  border-left-color: #2b303a;
  background: #f1f2f5;
  color: #20242d;
  font-weight: 800;
}

.read-toc-link.level-3 {
  padding-left: 28px;
  font-size: 12px;
}

.read-toc-empty {
  padding: 10px 16px;
  color: #8a92a1;
  font-size: 13px;
}

.article-directory-page {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

.directory-head {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.directory-head h1 {
  margin: 4px 0 8px;
  font-size: 32px;
  line-height: 1.2;
}

.directory-head p {
  max-width: 680px;
  color: var(--muted);
}

.directory-list {
  display: grid;
  gap: 10px;
}

.directory-row {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.directory-title {
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
}

.directory-row p {
  margin: 7px 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.directory-link-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.directory-link-pair a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  max-width: 100%;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.directory-link-pair a:hover {
  border-color: var(--green);
  color: var(--green-dark);
  text-decoration: none;
}

.directory-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.directory-pagination a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-soft);
  font-weight: 750;
}

.directory-pagination a.active,
.directory-pagination a:hover {
  border-color: var(--green);
  color: var(--green-dark);
  text-decoration: none;
}

.forbidden-page {
  min-height: 100vh;
  background: #242528;
  color: #f4f4f5;
}

.forbidden-topbar {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 8px;
  border-bottom: 1px solid #45464d;
}

.forbidden-topbar .topbar-logo {
  color: #ffffff !important;
}

.forbidden-content {
  display: grid;
  justify-items: center;
  gap: 34px;
  width: min(560px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 48px;
  text-align: center;
}

.forbidden-content h1 {
  margin: 0;
  color: #f4f4f5;
  font-size: 28px;
  line-height: 1.2;
}

.forbidden-mark {
  display: grid;
  width: 170px;
  height: 170px;
  place-items: center;
  border: 1px solid #8077d9;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  background: linear-gradient(180deg, rgba(95, 84, 180, 0.36), rgba(37, 34, 75, 0.48));
}

.forbidden-hand {
  color: #a8a3ff;
  font-size: 72px;
  line-height: 1;
}

.forbidden-content p {
  margin: 0;
  color: #f4f4f5;
  font-size: 14px;
  line-height: 1.65;
}

.forbidden-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 24px;
  width: min(344px, 100%);
}

.forbidden-actions .button {
  justify-content: center;
}

.forbidden-actions .button.ghost {
  border-color: #555761;
  background: transparent;
  color: #ffffff;
}

.read-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 46px;
  padding: 0 18px;
  border-bottom: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.96);
  color: #2f343d;
}

.read-crumb {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.read-crumb a,
.read-crumb span {
  flex: 0 0 auto;
  color: #2f343d;
}

.read-crumb strong {
  min-width: 0;
  overflow: hidden;
  color: #24292f;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
}

.read-avatar {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: #00664f;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.read-avatar:hover {
  text-decoration: none;
}

.read-avatar.small {
  width: 22px;
  height: 22px;
  font-size: 11px;
}

.read-avatar.large {
  width: 44px;
  height: 44px;
  font-size: 20px;
}

.doc-icon {
  color: #8b929e;
  font-size: 14px;
}

.read-top-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.read-top-actions .icon-button,
.read-md-link {
  width: 30px;
  height: 30px;
  min-height: 30px;
  border-radius: 5px;
  color: #667085;
  font-size: 15px;
}

.read-md-link {
  font-size: 11px;
  font-weight: 800;
}

.read-container {
  width: min(848px, calc(100% - 32px));
  margin: 0 auto;
}

.read-article {
  background: #fff;
}

.read-byline {
  display: flex;
  gap: 5px;
  align-items: center;
  width: min(728px, 100%);
  margin: 0 auto;
  padding-top: 18px;
  color: #3d434f;
  font-size: 15px;
  font-weight: 650;
}

.read-byline a {
  color: #2f343d;
}

.read-edited {
  width: min(728px, 100%);
  margin: 1px auto 26px;
  color: #69717e;
  font-size: 13px;
}

.read-edited a {
  color: #246bfe;
}

.read-markdown {
  width: min(728px, 100%);
  margin: 0 auto;
  padding: 0 0 48px;
  background: #fff;
  color: #303641;
  font-size: 16px;
  line-height: 1.85;
}

.read-markdown h2 {
  margin-top: 34px;
  padding-bottom: 8px;
  border-bottom: 1px solid #d9dde4;
  color: #333741;
  font-size: 25px;
}

.read-markdown table {
  border: 1px solid #d9dde4;
  border-radius: 3px;
}

.read-markdown th {
  background: #f3f4f6;
}

.read-last-edit {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  width: min(728px, 100%);
  margin: 0 auto;
  padding: 20px 0 14px;
  border-top: 1px solid #d7dbe2;
  color: #626b78;
  font-size: 12px;
}

.read-original-id-link {
  display: inline-block;
  max-width: min(360px, 48vw);
  overflow: hidden;
  color: #586273;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.read-original-id-link:hover {
  color: #246bfe;
  text-decoration: underline;
}

.read-author-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 34px;
  align-items: center;
  padding: 28px 0;
  border-top: 1px solid #d7dbe2;
  border-bottom: 1px solid #d7dbe2;
  background: #fff;
}

.read-author-main {
  display: flex;
  gap: 13px;
  align-items: center;
}

.read-author-main p {
  margin: 2px 0 0;
  color: #626b78;
  font-size: 13px;
  line-height: 1.5;
}

.read-author-name {
  color: #2f343d;
  font-weight: 750;
}

.read-action-panel {
  display: grid;
  justify-self: end;
  width: 260px;
  gap: 12px;
}

.read-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 18px 0 10px;
  color: #4f5866;
  font-size: 14px;
}

.read-stat-button,
.read-stat-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 20px;
  min-height: 28px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #4f5866;
  cursor: pointer;
  font: inherit;
}

.ui-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.read-top-actions .ui-icon {
  width: 18px;
  height: 18px;
}

.read-stat-view {
  cursor: default;
}

.read-stat-button:hover {
  background: #eceef2;
}

.read-stat-button.active,
.read-top-actions .icon-button.active {
  color: #606876;
  background: #eceef2;
  font-weight: 800;
}

.read-inline-action {
  border: 0;
  background: transparent;
  color: #4f46e5;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.read-inline-action:hover {
  text-decoration: underline;
}

.read-author-title {
  display: flex;
  align-items: center;
  gap: 4px;
}

.read-comment-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
}

.read-comment-actions .button.ghost {
  min-height: 40px;
  border-color: #d1d5db;
  color: #303641;
  font-weight: 500;
}

.read-comment-actions .icon-button.bordered {
  width: 42px;
  height: 40px;
  border-color: #d1d5db;
  background: #fff;
  color: #303641;
}

.read-more-menu-wrap {
  position: relative;
}

.read-more-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 12;
  min-width: 118px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.16);
}

.read-more-menu::after {
  position: absolute;
  right: 16px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  content: "";
}

.read-more-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: #303641;
  cursor: pointer;
  font-weight: 650;
  white-space: nowrap;
}

.read-more-menu button:hover {
  background: #f9fafb;
}

.single-note-page {
  min-height: 100vh;
  background: #ffffff;
  color: #2f343d;
}

.single-note-page .read-hover-toc {
  top: 50px;
}

.single-note-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto auto auto auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 8px;
  background: #202124;
  color: #f8fafc;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.single-note-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.single-note-brand:hover {
  color: #ffffff;
  text-decoration: none;
}

.single-note-brand-mark {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #3264dc;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
}

.single-note-mode-group {
  display: flex;
  overflow: hidden;
  border: 1px solid #4b4d55;
  border-radius: 4px;
  background: #282a30;
}

.single-note-mode,
.single-note-plain-button,
.single-note-more,
.single-note-user {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #f4f4f5;
  cursor: pointer;
  font-size: 17px;
}

.single-note-mode {
  width: 32px;
  height: 32px;
  color: #d7dbe2;
  font-size: 15px;
}

.single-note-mode + .single-note-mode {
  border-left: 1px solid #41434a;
}

.single-note-mode.active,
.single-note-mode:hover,
.single-note-plain-button:hover,
.single-note-more:hover {
  background: #3b3d46;
}

.single-note-mode .ui-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.single-note-help-button {
  position: relative;
}

.single-note-help-button::after {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 120;
  padding: 4px 7px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: #2f3138;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.28);
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  visibility: hidden;
}

.single-note-help-button::before {
  position: absolute;
  top: calc(100% + 3px);
  left: 50%;
  z-index: 121;
  width: 8px;
  height: 8px;
  transform: translateX(-50%) rotate(45deg);
  background: #2f3138;
  content: "";
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.single-note-help-button:hover::after,
.single-note-help-button:hover::before,
.single-note-help-button:focus-visible::after,
.single-note-help-button:focus-visible::before {
  opacity: 1;
  visibility: visible;
}

.single-note-create-wrap {
  position: relative;
}

.single-note-create-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 80;
  width: 184px;
  overflow: hidden;
  border: 1px solid #4a4c55;
  border-radius: 4px;
  background: #34353b;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.single-note-create-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid #4a4c55;
  padding: 0 20px;
  background: transparent;
  color: #eceef5;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
}

.single-note-create-menu button:last-child {
  border-bottom: 0;
}

.single-note-create-menu button:hover {
  background: #41434b;
}

.single-note-create-menu span {
  width: 14px;
  color: #c7ccd6;
  text-align: center;
}

.single-note-action-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  width: min(172px, calc(100% - 16px));
  min-height: 48px;
  margin: 0 8px -48px auto;
  padding: 8px 4px;
  background: #ffffff;
  box-sizing: border-box;
}

.single-note-tool {
  display: inline-grid;
  width: 24px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #5f6876;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.single-note-tool:visited {
  color: #5f6876;
}

.single-note-tool:hover,
.single-note-tool.active {
  color: #4f46e5;
  background: #f4f5ff;
  text-decoration: none;
}

.single-note-tool .ui-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.single-note-tool.active .ui-icon path[fill="currentColor"] {
  fill: currentColor;
}

.single-note-title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.single-note-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.single-note-login,
.single-note-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 4px;
  background: #5b4bff;
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.single-note-share {
  background: #6658ff;
}

.single-note-user {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #50b83c;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
}

.single-note-more {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: #3a3c43;
  letter-spacing: 1px;
}

.single-note-menu-wrap {
  position: relative;
}

.single-note-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 80;
  width: 198px;
  overflow: hidden;
  border: 1px solid #51535c;
  border-radius: 4px;
  background: #303139;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
}

.single-note-menu::before {
  position: absolute;
  top: -6px;
  right: 18px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  border-left: 1px solid #51535c;
  border-top: 1px solid #51535c;
  background: #303139;
  content: "";
}

.single-note-menu button,
.single-note-menu a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 51px;
  padding: 0 18px;
  border: 0;
  border-top: 1px solid #474951;
  background: transparent;
  color: #d9dce3;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}

.single-note-menu button:first-child,
.single-note-menu a:first-child {
  border-top: 0;
}

.single-note-menu button:hover,
.single-note-menu a:hover {
  background: #3b3d46;
  color: #ffffff;
  text-decoration: none;
}

.single-note-menu span {
  width: 18px;
  color: #c2c7d0;
  text-align: center;
}

.single-note-menu i {
  margin-left: auto;
  color: #c2c7d0;
  font-style: normal;
  font-size: 20px;
}

.single-note-shell {
  position: relative;
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 80px;
}

.single-note-article {
  width: min(728px, 100%);
  margin: 0 auto;
  background: #ffffff;
}

.single-note-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 44px;
  color: #5f6876;
  font-size: 14px;
}

.single-note-meta a {
  color: #2f6df6;
  font-weight: 700;
}

.single-note-markdown {
  color: #2f343d;
  font-size: 17px;
  line-height: 1.85;
}

.single-note-editor-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: calc(100vh - 52px);
  overflow: hidden;
  background: #25262b;
  color: #e9edf5;
}

.single-note-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 0 44px;
  border-top: 1px solid #3a3c43;
  border-bottom: 1px solid #3f4149;
  background: #303138;
  color: #d9dde7;
}

.single-note-editor-toolbar button {
  display: inline-grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: 700 13px/1 Consolas, "Courier New", monospace;
}

.single-note-editor-toolbar button:hover {
  background: #42444d;
}

.single-note-toolbar-divider {
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: #555761;
}

.single-note-source-pane {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  background: #25262b;
}

.single-note-line-numbers {
  margin: 0;
  padding: 16px 12px 16px 0;
  overflow: hidden;
  border-right: 1px solid #3a3c43;
  color: #737985;
  font: 18px/1.55 Consolas, "Courier New", monospace;
  text-align: right;
  user-select: none;
}

.single-note-source-input {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  padding: 16px 20px;
  background: #25262b;
  color: #f3f4f8;
  outline: 0;
  resize: none;
  font: 18px/1.55 Consolas, "Courier New", monospace;
  white-space: pre;
  overflow: auto;
}

.single-note-source-input::selection {
  background: rgba(103, 92, 255, 0.42);
}

.single-note-editor-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 26px;
  padding: 0 14px 0 48px;
  border-top: 1px solid #4f46e5;
  background: #323246;
  color: #dfe3ee;
  font-size: 12px;
  line-height: 26px;
}

.single-note-split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.single-note-split-preview {
  height: 100%;
  overflow: auto;
  padding: 26px min(8vw, 80px) 64px;
  background: #ffffff;
  color: #303641;
  font-size: 16px;
  line-height: 1.8;
}

.read-comments-panel {
  display: grid;
  gap: 16px;
  padding: 22px 0 8px;
  border-bottom: 1px solid #d7dbe2;
}

.read-comment-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d7dbe2;
  border-radius: 6px;
  background: #ffffff;
}

.read-comment-form textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 10px;
  color: #303641;
}

.read-comments-list {
  display: grid;
  gap: 12px;
}

.read-comment-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.read-comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.read-comment-head a {
  color: #303641;
  font-weight: 760;
}

.read-comment-head span,
.read-empty-comments {
  color: #7a8390;
}

.read-comment-row p {
  margin: 4px 0 0;
  color: #303641;
  line-height: 1.6;
  white-space: pre-wrap;
}

.read-more-section {
  padding: 30px 0 28px;
  background: #f7f7f5;
}

.read-more-section h2 {
  margin: 0 0 18px;
  color: #5c6470;
  font-size: 22px;
  font-weight: 760;
}

.read-more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.read-more-card {
  overflow: hidden;
  border: 1px solid #d2d6dd;
  border-radius: 6px;
  background: #fff;
}

.read-more-card:hover {
  border-color: #bac1cc;
}

.read-more-cover {
  display: block;
  height: 184px;
  border-bottom: 1px solid #eceff3;
  background: linear-gradient(135deg, #fff1a8, #fff8dc);
}

.read-more-cover.cover-1 {
  background: linear-gradient(135deg, #15171f, #384050 45%, #4ef2dd);
}

.read-more-cover.cover-2 {
  background: linear-gradient(135deg, #bdf1d7, #f0fff7);
}

.read-more-cover.cover-3 {
  background: linear-gradient(135deg, #f5a7cb, #fff1f7);
}

.read-more-content {
  padding: 16px 16px 18px;
}

.read-more-author {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 12px;
}

.read-more-author strong,
.read-more-author span {
  display: block;
}

.read-more-author strong {
  color: #303641;
  font-size: 14px;
}

.read-more-author span {
  color: #667085;
  font-size: 12px;
}

.read-more-title {
  display: -webkit-box;
  min-height: 45px;
  overflow: hidden;
  color: #303641;
  font-size: 16px;
  font-weight: 760;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.read-more-title:hover {
  color: var(--green-dark);
  text-decoration: none;
}

.read-more-content p {
  display: -webkit-box;
  min-height: 42px;
  margin: 7px 0 12px;
  overflow: hidden;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.read-more-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 26px;
}

.read-more-tags span {
  color: #5a47ff;
  font-size: 13px;
}

.read-more-tags span::before {
  content: "# ";
}

.read-more-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: #667085;
  font-size: 13px;
}

.read-more-like,
.read-more-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  gap: 6px;
  color: #526071;
}

.read-more-like {
  min-width: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 8px;
  background: transparent;
  cursor: pointer;
}

.read-more-like:hover,
.read-more-like.active {
  color: #ef4444;
  background: #fff1f2;
}

.read-more-like .ui-icon,
.read-more-view .ui-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.read-more-like .ui-icon {
  width: 20px;
  height: 20px;
}

.ssr-read-more-like {
  font-size: 20px;
  line-height: 1;
}

.read-empty-more {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px solid #d2d6dd;
  border-radius: 6px;
  background: #fff;
  color: #667085;
  text-align: center;
}

.read-more-button {
  display: flex;
  width: fit-content;
  margin: 30px auto 0;
}

.read-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 18px 0 26px;
  border-top: 1px solid #d7dbe2;
  color: #69717e;
  font-size: 13px;
}

.read-footer strong {
  color: #303641;
  font-size: 16px;
}

.article {
  padding: 0;
  overflow: hidden;
}

.article-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: space-between;
  padding: 12px 26px;
  border-bottom: 1px solid var(--line);
  background: #fcfcfd;
  color: var(--muted);
  font-size: 13px;
}

.toolbar-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--green-dark);
  cursor: pointer;
  font: inherit;
}

.link-button:hover {
  text-decoration: underline;
}

.article-head {
  padding: 38px 54px 18px;
}

.article-head h1 {
  max-width: 780px;
  font-size: 34px;
}

.article-head p {
  max-width: 760px;
  margin: 14px 0 16px;
  font-size: 16px;
}

.author-mini,
.author-box {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.author-box p {
  margin: 2px 0 0;
}

.markdown-body {
  padding: 12px 54px 52px;
  color: #24292f;
  font-size: 16px;
  line-height: 1.82;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin: 30px 0 14px;
  color: #111827;
  font-weight: 760;
}

.markdown-body h1 {
  display: none;
}

.markdown-body h2 {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 24px;
}

.markdown-body h3 {
  font-size: 19px;
}

.markdown-body p {
  margin: 14px 0;
}

.markdown-body blockquote {
  margin: 18px 0;
  padding: 10px 18px;
  border-left: 4px solid var(--green);
  background: #f5fbf8;
  color: #40534a;
}

.markdown-body blockquote p {
  margin: 6px 0;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 24px;
}

.markdown-body li {
  margin: 6px 0;
}

.markdown-body table {
  display: block;
  width: 100%;
  margin: 18px 0;
  overflow-x: auto;
  border-collapse: collapse;
}

.markdown-body th,
.markdown-body td {
  min-width: 120px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  vertical-align: top;
}

.markdown-body th {
  background: #f9fafb;
  font-weight: 750;
}

.markdown-body code {
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--code-bg);
  color: #7a3e1d;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

.markdown-body pre {
  margin: 18px 0;
  overflow: auto;
  border-radius: 8px;
  background: #101828;
  color: #f8fafc;
}

.markdown-body pre code {
  display: block;
  padding: 16px;
  background: transparent;
  color: inherit;
  font-size: 13px;
  line-height: 1.65;
}

.markdown-body img {
  max-width: 100%;
  border-radius: 8px;
}

.markdown-body hr {
  height: 1px;
  margin: 28px 0;
  border: 0;
  background: var(--line);
}

.toc {
  display: grid;
  gap: 7px;
}

.toc a {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.toc a:hover {
  color: var(--green-dark);
}

.toc-3 {
  padding-left: 12px;
}

.editor-form {
  display: grid;
  gap: 16px;
  padding: 30px;
}

.admin-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfd;
}

.admin-preview strong {
  color: var(--text);
}

.admin-preview span:last-child {
  color: var(--muted);
}

.editor-form label,
.auth-modal label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-weight: 650;
}

.editor-form label.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 2px;
}

.editor-form label.check-row input {
  width: 18px;
  height: 18px;
}

.editor-form input,
.editor-form textarea,
.editor-form select,
.auth-modal input,
.auth-modal textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  outline: 0;
}

.editor-form input[type="color"] {
  width: 72px;
  height: 42px;
  padding: 4px;
}

.editor-form input:focus,
.editor-form textarea:focus,
.auth-modal input:focus,
.auth-modal textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 157, 114, 0.12);
}

.editor-form textarea,
.auth-modal textarea {
  resize: vertical;
}

.admin-dashboard {
  display: grid;
  gap: 18px;
}

.admin-workbench {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: calc(100vh - 56px);
  background: #f6f7f9;
}

.admin-sidebar {
  position: sticky;
  top: 56px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: calc(100vh - 56px);
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.admin-sidebar h1 {
  margin: 0 0 12px;
  font-size: 22px;
}

.admin-role-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #d7eadf;
  border-radius: 999px;
  color: #157347;
  background: #effaf4;
  font-size: 13px;
  font-weight: 800;
}

.admin-sidebar a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--ink-soft);
  font-weight: 700;
}

.admin-sidebar a:hover {
  background: #f2f4f7;
  text-decoration: none;
}

.admin-sidebar a.active {
  color: #157347;
  background: #effaf4;
  box-shadow: inset 4px 0 0 var(--green);
}

.admin-nav-group {
  display: grid;
  gap: 6px;
  margin: 4px 0;
}

.admin-nav-group > span {
  padding: 4px 12px 2px;
  color: #101828;
  font-size: 13px;
  font-weight: 900;
}

.admin-sidebar a.admin-sub-link {
  min-height: 36px;
  margin-left: 10px;
  padding-left: 14px;
  font-size: 14px;
  font-weight: 750;
}

.admin-side-card {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfd;
  color: var(--muted);
  font-size: 13px;
}

.admin-seo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-seo-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfd;
  color: var(--muted);
  font-size: 13px;
}

.admin-seo-note code {
  color: var(--text);
  overflow-wrap: anywhere;
}

.admin-content {
  display: grid;
  gap: 18px;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 72px;
}

.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 22px;
}

.admin-form label:has(input[name="showDemoAccount"]),
.admin-form label:has(input[name="demoAccountTitle"]),
.admin-form label:has(input[name="demoAccountUser"]),
.admin-form label:has(input[name="demoAccountPassword"]),
.side-pane .side-box:has([data-action="auth"]) {
  display: none;
}

.admin-notes {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 22px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 12px;
}

.section-title:first-child {
  margin-top: 0;
}

.section-title h2 {
  font-size: 18px;
}

.section-title span {
  color: var(--muted);
}

.admin-note-list {
  display: grid;
  gap: 10px;
}

.admin-create-user {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfd;
}

.admin-bulk-card {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfd;
}

.admin-bulk-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.admin-bulk-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-bulk-card textarea,
.admin-result-box {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  outline: 0;
  resize: vertical;
}

.admin-result-box {
  min-height: 120px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.55;
}

.admin-import-file-row,
.admin-import-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-import-file-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-md-import-form .admin-import-options {
  grid-template-columns: minmax(220px, 360px);
}

.admin-publish-batch-form .admin-import-options {
  grid-template-columns: repeat(6, minmax(104px, 1fr));
}

.admin-date-range-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-import-file-row label,
.admin-import-options label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-weight: 650;
}

.admin-import-file-row input,
.admin-import-options input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
}

.admin-import-progress {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
}

.admin-publish-user-list {
  display: grid;
  gap: 10px;
}

.admin-publish-user-row {
  display: grid;
  grid-template-columns: 44px minmax(180px, 1fr) minmax(420px, 1.5fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-publish-user-main {
  min-width: 0;
}

.admin-publish-user-main p {
  margin: 4px 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.admin-publish-user-row label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.admin-publish-row-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 10px;
}

.admin-publish-user-row input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
  color: var(--text);
}

.admin-create-user label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-weight: 650;
}

.admin-data-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.admin-data-grid div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfd;
}

.admin-data-grid strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1.1;
}

.admin-data-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-article-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 260px));
  gap: 10px;
  margin: 0 0 14px;
}

.admin-article-stats div {
  display: grid;
  gap: 5px;
  min-height: 82px;
  align-content: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfd;
}

.admin-article-stats strong {
  color: var(--text);
  font-size: 25px;
  line-height: 1;
}

.admin-article-stats span {
  color: #344054;
  font-size: 14px;
  font-weight: 750;
}

.admin-data-list {
  display: grid;
  gap: 10px;
}

.admin-create-user input,
.admin-create-user select,
.admin-user-search input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  outline: 0;
}

.admin-create-user input:focus,
.admin-create-user select:focus,
.admin-user-search input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 157, 114, 0.12);
}

.admin-create-user .button,
.admin-create-user .form-message {
  align-self: end;
}

.admin-user-search {
  margin-bottom: 12px;
}

.admin-publish-search {
  margin: 14px 0 12px;
}

.admin-article-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-article-toolbar input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  outline: 0;
}

.admin-check-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-weight: 700;
}

.admin-check-all input,
.admin-row-check input {
  width: 18px;
  height: 18px;
}

.admin-load-more-row {
  display: flex;
  justify-content: center;
  padding: 10px 0 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-user-list {
  display: grid;
  gap: 10px;
}

.admin-note-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfd;
}

.admin-user-row,
.admin-data-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfd;
}

.admin-article-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.admin-row-check {
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-note-row p {
  margin: 5px 0 8px;
  color: var(--muted);
}

.admin-user-row p,
.admin-data-row p {
  margin: 4px 0 7px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.admin-note-title {
  color: var(--text);
  font-weight: 750;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.row-actions .button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-actions {
  display: flex;
  gap: 10px;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--warning);
}

.empty-state {
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.empty-state.large {
  padding: 58px 30px;
}

.empty-state.large h1 {
  margin-bottom: 10px;
  font-size: 28px;
}

.muted {
  color: var(--muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(16, 24, 40, 0.42);
}

.auth-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 31;
  display: grid;
  width: min(420px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  gap: 16px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-required-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 31;
  display: grid;
  justify-items: center;
  width: min(400px, calc(100% - 32px));
  gap: 18px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.login-required-modal h2 {
  justify-self: start;
  margin: 0;
  padding-right: 34px;
  color: #172033;
  font-size: 20px;
  line-height: 1.35;
}

.login-required-modal p {
  margin: 0;
  color: #303641;
}

.login-required-art {
  position: relative;
  display: grid;
  width: 140px;
  height: 104px;
  place-items: center;
  margin-top: 10px;
}

.login-required-art::before,
.login-required-art::after {
  position: absolute;
  z-index: -1;
  width: 82px;
  height: 30px;
  border-radius: 999px;
  background: #d6d4ea;
  content: "";
}

.login-required-art::before {
  left: 4px;
  top: 26px;
  background: #dedbff;
}

.login-required-art::after {
  right: 0;
  bottom: 24px;
  background: #d7d9df;
}

.doc-shape {
  display: grid;
  width: 58px;
  height: 76px;
  place-items: center;
  transform: rotate(10deg);
  border-radius: 4px;
  background: #4f46e5;
  color: #ffffff;
  font-size: 34px;
}

.spark {
  position: absolute;
  color: #ffc83d;
  font-size: 18px;
}

.spark-a {
  right: 18px;
  top: 18px;
}

.spark-b {
  left: 20px;
  bottom: 24px;
}

.login-required-link {
  border: 0;
  background: transparent;
  color: #4f46e5;
  cursor: pointer;
  font-weight: 700;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 24px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 6px;
  background: #f2f4f7;
}

.auth-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}

.auth-tabs button.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.auth-modal form {
  display: grid;
  gap: 13px;
}

.hidden {
  display: none !important;
}

.ssr-article {
  width: min(820px, calc(100% - 32px));
  margin: 40px auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ssr-article > .markdown-body {
  padding: 32px 44px 20px;
}

.ssr-author-panel {
  padding-right: 44px;
  padding-left: 44px;
}

.ssr-read-more {
  padding-right: 44px;
  padding-left: 44px;
}

.ssr-home-page {
  width: min(1240px, calc(100% - 40px));
  margin: 28px auto 72px;
}

.ssr-profile-page {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
  background: #242528;
  color: #f2f4f7;
}

.ssr-profile-sidebar {
  min-height: 100vh;
  padding: 44px 22px;
  border-right: 1px solid #3a3b42;
  background: #242528;
}

.ssr-profile-avatar {
  display: grid;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
}

.ssr-profile-sidebar h1 {
  margin: 0 0 2px;
  color: #fff;
  font-size: 17px;
  line-height: 1.35;
}

.ssr-profile-handle,
.ssr-profile-bio,
.ssr-profile-sidebar section p,
.ssr-profile-joined {
  color: #b7bac4;
}

.ssr-profile-handle {
  margin: 0 0 4px;
  font-size: 13px;
}

.ssr-profile-bio {
  margin: 0 0 20px;
  line-height: 1.7;
}

.ssr-profile-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 18px;
  color: #cfd2dc;
  font-size: 13px;
}

.ssr-profile-counts strong {
  color: #fff;
}

.ssr-profile-follow {
  display: inline-grid;
  min-width: 176px;
  min-height: 38px;
  margin-bottom: 18px;
  place-items: center;
  border: 1px solid var(--green);
  border-radius: 5px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.ssr-profile-follow:hover {
  color: #fff;
  text-decoration: none;
}

.ssr-profile-sidebar section {
  margin-top: 18px;
}

.ssr-profile-sidebar section h2 {
  margin: 0 0 8px;
  color: #d6d8e1;
  font-size: 13px;
}

.ssr-profile-sidebar section p,
.ssr-profile-sidebar section a {
  margin: 0;
  color: #b7bac4;
  font-size: 13px;
}

.ssr-profile-joined {
  margin-top: 24px;
  font-size: 12px;
}

.ssr-profile-main {
  min-width: 0;
  background: #242528;
}

.ssr-profile-tabs {
  display: flex;
  height: 56px;
  align-items: end;
  gap: 22px;
  padding: 0 24px;
  border-bottom: 1px solid #3a3b42;
}

.ssr-profile-tabs span {
  display: inline-flex;
  height: 56px;
  align-items: center;
  border-bottom: 2px solid transparent;
  color: #c9ccd6;
  font-size: 14px;
}

.ssr-profile-tabs span.active {
  border-color: var(--green);
  color: #fff;
  font-weight: 800;
}

.ssr-profile-tabs b {
  margin-left: 6px;
  color: #9da3af;
  font-size: 12px;
}

.ssr-profile-board {
  width: min(100%, 920px);
  padding: 24px;
}

.ssr-profile-board header {
  margin-bottom: 18px;
}

.ssr-profile-board h2 {
  margin: 0;
  color: #fff;
  font-size: 22px;
}

.ssr-profile-empty {
  display: grid;
  min-height: 260px;
  place-items: center;
  border: 1px solid #3a3b42;
  border-radius: 6px;
  background: #2c2d31;
  color: #c9ccd6;
  text-align: center;
}

.ssr-profile-note-list {
  display: grid;
  gap: 12px;
}

.ssr-profile-note-card {
  border: 1px solid #3a3b42;
  border-radius: 6px;
  background: #2c2d31;
}

.ssr-profile-note-card > a {
  display: block;
  padding: 18px 20px 8px;
  color: #f2f4f7;
  text-decoration: none;
}

.ssr-profile-note-card span {
  display: block;
  margin-bottom: 8px;
  color: #aeb2be;
  font-size: 12px;
}

.ssr-profile-note-card h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 20px;
  line-height: 1.25;
}

.ssr-profile-note-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #d8dae2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.55;
}

.ssr-profile-note-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px 20px 16px;
  font-size: 13px;
}

.ssr-profile-note-links a {
  color: #8fd3c7;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .ssr-profile-page {
    grid-template-columns: 1fr;
  }

  .ssr-profile-sidebar {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid #3a3b42;
    padding: 28px 20px;
  }

  .ssr-profile-board {
    width: 100%;
    padding: 20px;
  }
}

@media (max-width: 980px) {
  .topbar {
    gap: 12px;
    padding: 0 14px;
  }

  .topnav {
    display: none;
  }

  .brand-text {
    display: none;
  }

  .page-grid,
  .page-grid.single {
    grid-template-columns: 1fr;
    width: min(100% - 24px, 820px);
    margin-top: 16px;
  }

  .page-grid.single.home-grid {
    width: min(100% - 24px, 1240px);
  }

  .side-box.sticky {
    position: static;
  }

  .home-head {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .home-hero,
  .home-body {
    grid-template-columns: 1fr;
  }

  .home-sidebar {
    position: static;
  }

  .home-hero-copy {
    padding: 26px;
  }

  .home-hero-copy h1 {
    font-size: 29px;
  }

  .home-author-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .home-author-row small {
    grid-column: 2;
  }

  .profile-head {
    align-items: flex-start;
    padding: 24px;
  }

  .workspace-head {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .workspace-actions {
    flex-wrap: wrap;
  }

  .profile-shell {
    grid-template-columns: 1fr;
  }

  .profile-sidebar {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid #3a3b42;
    padding: 28px 20px;
  }

  .boost-panel {
    grid-template-columns: 1fr;
  }

  .boost-art {
    display: none;
  }

  .settings-shell {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid #4a4b53;
    padding: 14px;
  }

  .settings-nav p {
    display: none;
  }

  .settings-nav a {
    white-space: nowrap;
  }

  .settings-main {
    width: min(100% - 28px, 760px);
    padding-top: 22px;
  }

  .article-head {
    padding: 28px 24px 12px;
  }

  .article-head h1 {
    font-size: 27px;
  }

  .markdown-body {
    padding: 8px 24px 38px;
    font-size: 15px;
  }
}

@media (max-width: 560px) {
  .top-actions .button.ghost {
    display: none;
  }

  .top-actions {
    margin-left: auto;
  }

  .home-head h1,
  .profile-head h1,
  .editor-head h1 {
    font-size: 24px;
  }

  .home-hero-copy,
  .home-featured-wrap,
  .home-side-panel {
    padding: 18px;
  }

  .home-hero-copy h1 {
    font-size: 25px;
  }

  .home-stats {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-note-card h2 {
    font-size: 19px;
  }

  .home-note-main,
  .home-note-meta,
  .home-note-tags,
  .home-note-links {
    padding-right: 16px;
    padding-left: 16px;
  }

  .profile-head {
    display: grid;
  }

  .workspace-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .profile-tabs {
    padding: 0 16px;
  }

  .boost-panel {
    margin: 16px;
    padding: 18px;
  }

  .profile-note-list {
    padding: 0;
  }

  .public-notes-board {
    padding: 18px 16px 44px;
  }

  .public-notes-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-notes-tools {
    width: 100%;
    justify-content: flex-end;
  }

  .settings-card {
    padding: 16px;
  }

  .settings-close {
    right: 0;
  }

  .article-toolbar {
    padding: 10px 16px;
  }

  .article-head {
    padding: 24px 18px 10px;
  }

  .article-head h1 {
    font-size: 23px;
  }

  .markdown-body {
    padding: 4px 18px 30px;
  }

  .forbidden-content {
    padding-top: 42px;
  }

  .forbidden-actions {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .editor-form {
    padding: 20px;
  }

  .form-actions {
    display: grid;
  }

  .admin-note-row {
    grid-template-columns: 1fr;
  }

  .admin-article-stats {
    grid-template-columns: 1fr;
  }

  .admin-workbench {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-content {
    width: min(100% - 24px, 900px);
    padding-top: 16px;
  }

  .admin-article-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-create-user,
  .admin-import-file-row,
  .admin-import-options,
  .admin-user-row,
  .admin-data-row,
  .admin-publish-user-row,
  .admin-article-row {
    grid-template-columns: 1fr;
  }

  .admin-data-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-md-import-form .admin-import-options,
  .admin-publish-batch-form .admin-import-options {
    grid-template-columns: 1fr;
  }

  .admin-publish-row-options {
    grid-template-columns: 1fr;
  }

  .row-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .read-topbar {
    gap: 10px;
    padding: 0 10px;
  }

  .read-hover-toc {
    display: none;
  }

  .ssr-article > .markdown-body,
  .ssr-author-panel,
  .ssr-read-more {
    padding-right: 18px;
    padding-left: 18px;
  }

  .read-crumb {
    flex: 1 1 auto;
  }

  .read-crumb strong {
    max-width: 46vw;
  }

  .read-top-actions {
    gap: 2px;
  }

  .read-top-actions .icon-button:nth-child(2),
  .read-top-actions .icon-button:nth-child(3),
  .read-md-link {
    display: none;
  }

  .read-container {
    width: min(100% - 20px, 728px);
  }

  .read-byline {
    padding-top: 16px;
  }

  .read-markdown {
    padding: 0 0 34px;
    font-size: 15px;
  }

  .read-markdown h2 {
    font-size: 22px;
  }

  .read-author-panel {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 0;
  }

  .read-action-panel {
    width: 100%;
  }

  .read-more-grid {
    grid-template-columns: 1fr;
  }

  .read-more-cover {
    height: 170px;
  }

  .single-note-topbar {
    grid-template-columns: auto auto auto auto minmax(0, 1fr) auto;
    gap: 4px;
    height: 50px;
  }

  .single-note-brand span:last-child,
  .single-note-user {
    display: none;
  }

  .single-note-title {
    text-align: left;
  }

  .single-note-login,
  .single-note-share {
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }

  .single-note-more {
    width: 36px;
    height: 36px;
  }

  .single-note-action-strip {
    justify-content: center;
    gap: 14px;
    width: min(162px, calc(100% - 12px));
    margin: 0 6px -46px auto;
    min-height: 46px;
    padding: 7px 3px;
  }

  .single-note-editor-toolbar {
    padding: 0 10px;
    overflow-x: auto;
  }

  .single-note-source-pane {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .single-note-line-numbers,
  .single-note-source-input {
    font-size: 14px;
  }

  .single-note-split-layout {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .single-note-split-layout .single-note-source-pane {
    min-height: 52vh;
  }

  .single-note-split-preview {
    min-height: 52vh;
    padding: 22px 18px 48px;
  }

  .single-note-shell {
    width: min(100% - 24px, 728px);
    padding: 52px 0 60px;
  }

  .single-note-meta {
    margin-bottom: 28px;
  }

  .single-note-markdown {
    font-size: 15px;
  }
}
