:root {
  --paper: #f7f8f4;
  --surface: #ffffff;
  --surface-soft: #f1f4ee;
  --surface-hover: #edf2eb;
  --green-900: #123b2e;
  --green-800: #174c3c;
  --green-700: #21634d;
  --green-100: #e6efe8;
  --green-50: #f0f5f0;
  --ink: #18231f;
  --ink-soft: #34423c;
  --muted: #5f6e65;
  --muted-light: #66756b;
  --border: #e0e6de;
  --border-strong: #ccd6cc;
  --danger: #a33b32;
  --danger-soft: #fbefed;
  --warning: #8a5b16;
  --warning-soft: #fbf4e6;
  --success: #286343;
  --success-soft: #eaf4ec;
  --focus: #2f765b;
  --sidebar-width: 248px;
  --rail-width: 220px;
  --content-width: 860px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 14px;
  --shadow-overlay: 0 20px 60px rgba(20, 39, 30, 0.18);
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

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

a:hover {
  color: var(--green-900);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(47, 118, 91, 0.24);
  outline-offset: 2px;
}

button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

::selection {
  background: #d9e9dc;
  color: var(--green-900);
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--green-800);
  color: #fff;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

.noscript {
  margin: 80px auto;
  max-width: 480px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.svg-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  vertical-align: -3px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: #fbfcf8;
}

.sidebar-top {
  padding: 25px 18px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 24px;
  color: var(--ink);
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--green-800);
  color: #fff;
}

.brand-mark .svg-icon {
  width: 20px;
  height: 20px;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sidebar-search {
  position: relative;
  margin-bottom: 12px;
}

.sidebar-search .svg-icon {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 16px;
  height: 16px;
  color: var(--muted-light);
  transform: translateY(-50%);
  pointer-events: none;
}

.sidebar-search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 35px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.sidebar-search input::placeholder {
  color: #66756b;
}

.sidebar-search input:focus {
  border-color: #91b19d;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 118, 91, 0.09);
}

.sidebar-actions {
  display: grid;
  gap: 8px;
}

.btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: var(--surface-hover);
  color: var(--ink);
}

.btn-primary {
  border-color: var(--green-800);
  background: var(--green-800);
  color: #fff;
}

.btn-primary:hover {
  border-color: var(--green-900);
  background: var(--green-900);
  color: #fff;
}

.btn-secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--ink-soft);
}

.btn-secondary:hover {
  border-color: #aebfb1;
  background: var(--green-50);
  color: var(--green-900);
}

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

.btn-danger {
  border-color: #e6c5c0;
  background: var(--danger-soft);
  color: var(--danger);
}

.btn-danger:hover {
  border-color: #d8a49d;
  background: #f7e4e1;
  color: #872d25;
}

.btn-sm {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

.btn .svg-icon {
  width: 16px;
  height: 16px;
}

.sidebar-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 4px 12px 18px;
  scrollbar-width: thin;
  scrollbar-color: #d7ded5 transparent;
}

.nav-section {
  margin: 17px 0 22px;
}

.nav-section-title {
  margin: 0 10px 8px;
  color: var(--muted-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nav-link {
  display: flex;
  min-height: 37px;
  align-items: center;
  gap: 9px;
  margin: 2px 0;
  padding: 8px 10px;
  border-radius: 8px;
  color: #526159;
  font-size: 13px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  background: var(--surface-hover);
  color: var(--green-900);
}

.nav-link.active {
  background: var(--green-100);
  color: var(--green-900);
  font-weight: 600;
}

.nav-link .svg-icon {
  width: 16px;
  height: 16px;
  color: #78877d;
}

.nav-link.active .svg-icon {
  color: var(--green-700);
}

.nav-link-label {
  overflow: hidden;
  flex: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-count {
  color: var(--muted-light);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.recent-link {
  display: block;
  padding: 7px 10px;
  border-radius: 7px;
  color: #637168;
  font-size: 12px;
  line-height: 1.5;
}

.recent-link:hover {
  background: var(--surface-hover);
  color: var(--green-900);
}

.recent-link span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer {
  padding: 14px 14px 16px;
  border-top: 1px solid var(--border);
  background: #fbfcf8;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 4px 5px;
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #d3dfd3;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-800);
  font-size: 13px;
  font-weight: 700;
}

.user-meta {
  min-width: 0;
  flex: 1;
}

.user-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-phone {
  color: var(--muted-light);
  font-size: 11px;
}

.sidebar-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-button {
  padding: 4px 5px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.text-button:hover {
  color: var(--green-800);
}

.main-area {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.mobile-topbar {
  display: none;
}

.page-content {
  width: 100%;
  max-width: 1192px;
  margin: 0 auto;
  padding: 46px 48px 80px;
}

.page-content.narrow {
  max-width: 980px;
}

.page-content.editor-content {
  max-width: 1120px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.page-heading {
  min-width: 0;
}

.page-kicker {
  margin: 0 0 8px;
  color: var(--green-700);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.page-title {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.page-subtitle {
  max-width: 700px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.page-header-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 9px;
  padding-top: 4px;
}

.search-panel {
  margin-bottom: 24px;
  padding: 0;
}

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

.search-input-wrap {
  position: relative;
  min-width: 0;
  flex: 1;
}

.search-input-wrap > .svg-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 19px;
  height: 19px;
  color: var(--muted-light);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-input-wrap input {
  width: 100%;
  height: 46px;
  padding: 0 16px 0 45px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fcfdfb;
  color: var(--ink);
  font-size: 14px;
}

.search-input-wrap input:focus {
  border-color: #91b19d;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 118, 91, 0.09);
}

.search-form-large .btn {
  min-height: 46px;
  padding-right: 20px;
  padding-left: 20px;
}

.search-hint {
  margin: 9px 0 0 2px;
  color: var(--muted-light);
  font-size: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 30px;
}

.stat-card {
  padding: 16px 22px;
  border-right: 1px solid var(--border);
  color: inherit;
  transition: background 0.15s ease;
}

a.stat-card:hover {
  background: rgba(255, 255, 255, 0.55);
  color: inherit;
}

.stat-card:first-child {
  padding-left: 0;
}

.stat-card:last-child {
  padding-right: 0;
  border-right: 0;
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
}

.stat-label .svg-icon {
  width: 15px;
  height: 15px;
  color: #829187;
}

.stat-value {
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.stat-value.date-value {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
}

.section-block {
  margin-top: 30px;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-title {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-caption {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: #5e6d64;
  font-size: 12px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip:hover {
  border-color: #b6c9b9;
  background: var(--green-50);
  color: var(--green-900);
}

.chip.active {
  border-color: #a9c1ae;
  background: var(--green-100);
  color: var(--green-900);
  font-weight: 600;
}

.chip-count {
  color: var(--muted-light);
  font-size: 11px;
}

.page-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.page-list-item {
  display: block;
  padding: 19px 21px;
  border-bottom: 1px solid var(--border);
  color: inherit;
  transition: background 0.15s ease;
}

.page-list-item:last-child {
  border-bottom: 0;
}

.page-list-item:hover {
  background: #fbfcf9;
  color: inherit;
}

.page-list-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.page-list-title {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.55;
}

.page-list-item:hover .page-list-title {
  color: var(--green-800);
}

.version-badge {
  display: inline-flex;
  min-height: 23px;
  flex: 0 0 auto;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid #dce5dc;
  border-radius: 999px;
  background: #f6f8f4;
  color: #5f6e65;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.page-list-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 6px 0 11px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.page-list-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 13px;
  color: var(--muted-light);
  font-size: 11px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.meta-item .svg-icon {
  width: 13px;
  height: 13px;
}

.category-label {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--green-50);
  color: var(--green-700);
  font-size: 11px;
}

.empty-state {
  padding: 48px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.52);
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 13px;
  background: var(--green-100);
  color: var(--green-700);
}

.empty-icon .svg-icon {
  width: 22px;
  height: 22px;
}

.empty-title {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
}

.empty-description {
  max-width: 440px;
  margin: 0 auto 18px;
  color: var(--muted);
  font-size: 13px;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

.loading-state {
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.spinner {
  display: inline-block;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border: 2px solid #d8e2d8;
  border-top-color: var(--green-700);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.spinner-sm {
  width: 14px;
  height: 14px;
  border-width: 1.7px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-state {
  padding: 34px 26px;
  border: 1px solid #ead4d0;
  border-radius: var(--radius-lg);
  background: #fffafa;
  text-align: center;
}

.error-state h2 {
  margin: 0 0 8px;
  color: #79352e;
  font-size: 17px;
}

.error-state p {
  max-width: 560px;
  margin: 0 auto 18px;
  color: #8b625c;
  font-size: 13px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--content-width)) var(--rail-width);
  align-items: start;
  gap: 42px;
}

.article-main {
  min-width: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 17px;
  color: var(--muted-light);
  font-size: 12px;
}

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

.breadcrumb .svg-icon {
  width: 12px;
  height: 12px;
}

.article-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(27px, 3vw, 35px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.35;
}

.article-description {
  margin: 12px 0 0;
  color: #5f6e65;
  font-size: 15px;
  line-height: 1.8;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 20px 0 25px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.article-meta .meta-item {
  gap: 6px;
}

.article-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -7px 0 24px;
}

.mobile-article-nav {
  display: none;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafbf8;
  color: #5f6e65;
  font-size: 11px;
}

.article-body {
  color: #29362f;
  font-size: 15px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.article-body > :first-child {
  margin-top: 0;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.45;
  scroll-margin-top: 28px;
}

.article-body h1 {
  margin: 34px 0 15px;
  font-size: 27px;
}

.article-body h2 {
  margin: 36px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 22px;
}

.article-body h3 {
  margin: 28px 0 11px;
  font-size: 18px;
}

.article-body h4 {
  margin: 23px 0 9px;
  font-size: 16px;
}

.article-body p {
  margin: 13px 0;
}

.article-body ul,
.article-body ol {
  margin: 13px 0;
  padding-left: 24px;
}

.article-body li {
  margin: 5px 0;
}

.article-body li > p {
  margin: 5px 0;
}

.article-body blockquote {
  margin: 20px 0;
  padding: 12px 17px;
  border-left: 3px solid #8aaa94;
  border-radius: 0 8px 8px 0;
  background: var(--green-50);
  color: #4e6155;
}

.article-body blockquote > :last-child {
  margin-bottom: 0;
}

.article-body code {
  padding: 2px 5px;
  border: 1px solid #e1e6df;
  border-radius: 4px;
  background: #f1f4ef;
  color: #345443;
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
  font-size: 0.88em;
}

.article-body pre {
  overflow-x: auto;
  margin: 19px 0;
  padding: 16px 18px;
  border: 1px solid #dbe3d9;
  border-radius: 10px;
  background: #f1f4ef;
  line-height: 1.65;
}

.article-body pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: #2f4437;
  font-size: 12.5px;
}

.article-body a {
  text-decoration: underline;
  text-decoration-color: #b5cbb9;
  text-underline-offset: 3px;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 9px;
}

.article-body table {
  display: block;
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
  border-collapse: collapse;
  font-size: 13px;
}

.article-body th,
.article-body td {
  min-width: 110px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.article-body th {
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 650;
}

.article-body hr {
  margin: 30px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.article-body input[type="checkbox"] {
  margin-right: 6px;
}

.right-rail {
  position: sticky;
  top: 28px;
  padding-top: 4px;
}

.rail-section {
  margin-bottom: 27px;
}

.rail-title {
  margin: 0 0 11px;
  color: #5f6e65;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.toc-list {
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
  list-style: none;
}

.toc-link {
  display: block;
  margin-left: -1px;
  padding: 5px 0 5px 13px;
  border-left: 2px solid transparent;
  color: #5f6e65;
  font-size: 12px;
  line-height: 1.5;
}

.toc-link:hover {
  border-left-color: #b2c6b5;
  color: var(--green-800);
}

.toc-link.active {
  border-left-color: var(--green-700);
  color: var(--green-900);
  font-weight: 600;
}

.toc-link.level-3 {
  padding-left: 25px;
  font-size: 11.5px;
}

.source-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
}

.source-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 8px;
  padding: 6px 0;
  font-size: 11.5px;
  line-height: 1.55;
}

.source-row + .source-row {
  border-top: 1px solid #edf0ea;
}

.source-key {
  color: var(--muted-light);
}

.source-value {
  min-width: 0;
  color: #526258;
  overflow-wrap: anywhere;
}

.version-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.version-item {
  position: relative;
  padding: 0 0 15px 17px;
  border-left: 1px solid var(--border);
  color: var(--muted);
  font-size: 11.5px;
}

.version-item:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.version-item::before {
  position: absolute;
  top: 5px;
  left: -4px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: #a6b6a8;
  content: "";
}

.version-item:first-child::before {
  background: var(--green-700);
}

.version-item-title {
  color: #526258;
  font-weight: 600;
}

.version-item-note {
  margin-top: 2px;
  color: var(--muted-light);
  line-height: 1.5;
}

.form-panel {
  padding: 0;
}

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

.form-field {
  min-width: 0;
}

.form-field.full-width {
  grid-column: 1 / -1;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: #415147;
  font-size: 13px;
  font-weight: 600;
}

.form-label .optional {
  color: var(--muted-light);
  font-size: 11px;
  font-weight: 400;
}

.form-control {
  width: 100%;
  min-height: 41px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: #fdfefc;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.6;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control::placeholder {
  color: #66756b;
}

.form-control:focus {
  border-color: #91b19d;
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 118, 91, 0.09);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.markdown-editor {
  min-height: 380px;
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.75;
  tab-size: 2;
}

.field-help {
  margin: 6px 0 0;
  color: var(--muted-light);
  font-size: 11.5px;
}

.field-error {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 12px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.form-actions-left {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 9px;
}

.import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
  gap: 24px;
}

.import-aside {
  padding: 19px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.58);
}

.import-aside h2 {
  margin: 0 0 13px;
  font-size: 14px;
}

.flow-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-item {
  position: relative;
  display: flex;
  gap: 11px;
  padding-bottom: 19px;
}

.flow-item:last-child {
  padding-bottom: 0;
}

.flow-item:not(:last-child)::after {
  position: absolute;
  top: 25px;
  bottom: 3px;
  left: 11px;
  width: 1px;
  background: var(--border);
  content: "";
}

.flow-number {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #cddacd;
  border-radius: 50%;
  background: var(--surface);
  color: var(--green-700);
  font-size: 11px;
  font-weight: 700;
}

.flow-item.done .flow-number {
  border-color: var(--green-700);
  background: var(--green-700);
  color: #fff;
}

.flow-item.current .flow-number {
  border-color: var(--green-700);
  background: var(--green-100);
  color: var(--green-900);
}

.flow-title {
  color: #4c5d52;
  font-size: 12.5px;
  font-weight: 600;
}

.flow-description {
  margin-top: 2px;
  color: var(--muted-light);
  font-size: 11.5px;
  line-height: 1.55;
}

.dropzone {
  position: relative;
  display: flex;
  min-height: 265px;
  align-items: center;
  justify-content: center;
  padding: 30px;
  border: 1.5px dashed #b8c9ba;
  border-radius: var(--radius-lg);
  background: #fbfcf9;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone.dragover {
  border-color: var(--green-700);
  background: var(--green-50);
}

.dropzone-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.dropzone-content {
  max-width: 420px;
}

.upload-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 15px;
  place-items: center;
  border-radius: 15px;
  background: var(--green-100);
  color: var(--green-700);
}

.upload-icon .svg-icon {
  width: 25px;
  height: 25px;
}

.dropzone-title {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
}

.dropzone-description {
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 12.5px;
}

.file-types {
  margin-top: 13px;
  color: var(--muted-light);
  font-size: 11px;
}

.selected-file {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #cdddcf;
  border-radius: var(--radius);
  background: var(--green-50);
}

.file-icon {
  display: grid;
  width: 40px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #d2dfd3;
  border-radius: 8px;
  background: #fff;
  color: var(--green-700);
  font-size: 10px;
  font-weight: 700;
}

.file-meta {
  min-width: 0;
  flex: 1;
}

.file-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.processing-panel {
  padding: 44px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.processing-visual {
  position: relative;
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto 22px;
  place-items: center;
  border-radius: 20px;
  background: var(--green-100);
  color: var(--green-700);
}

.processing-visual .spinner {
  position: absolute;
  inset: -7px;
  width: auto;
  height: auto;
  border-width: 2px;
}

.processing-visual .svg-icon {
  width: 28px;
  height: 28px;
}

.processing-title {
  margin: 0 0 8px;
  font-size: 18px;
}

.processing-description {
  max-width: 480px;
  margin: 0 auto 22px;
  color: var(--muted);
  font-size: 13px;
}

.progress-track {
  overflow: hidden;
  width: min(100%, 380px);
  height: 5px;
  margin: 0 auto 12px;
  border-radius: 99px;
  background: #e9eee6;
}

.progress-bar {
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: var(--green-700);
  animation: progress 1.8s ease-in-out infinite;
}

@keyframes progress {
  0% {
    transform: translateX(-105%);
  }
  100% {
    transform: translateX(370%);
  }
}

.processing-file {
  color: var(--muted-light);
  font-size: 11.5px;
}

.review-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid #d5e2d4;
  border-radius: var(--radius);
  background: var(--green-50);
}

.review-banner > .svg-icon {
  margin-top: 2px;
  color: var(--green-700);
}

.review-banner-title {
  color: var(--green-900);
  font-size: 13px;
  font-weight: 650;
}

.review-banner-text {
  margin-top: 2px;
  color: #617365;
  font-size: 12px;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.segmented-control {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #f1f4ee;
}

.segmented-button {
  min-height: 29px;
  padding: 4px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.segmented-button.active {
  background: var(--surface);
  color: var(--green-900);
  font-weight: 600;
}

.editor-count {
  color: var(--muted-light);
  font-size: 11px;
}

.markdown-preview {
  min-height: 380px;
  padding: 20px 22px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: #fdfefc;
  color: #29362f;
  font-size: 14px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.markdown-preview > :first-child {
  margin-top: 0;
}

.markdown-preview > :last-child {
  margin-bottom: 0;
}

.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3,
.markdown-preview h4 {
  margin: 24px 0 10px;
  color: var(--ink);
  line-height: 1.45;
}

.markdown-preview h1 {
  font-size: 24px;
}

.markdown-preview h2 {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  font-size: 20px;
}

.markdown-preview h3 {
  font-size: 17px;
}

.markdown-preview p {
  margin: 11px 0;
}

.markdown-preview ul,
.markdown-preview ol {
  padding-left: 23px;
}

.markdown-preview blockquote {
  margin: 16px 0;
  padding: 9px 14px;
  border-left: 3px solid #8aaa94;
  background: var(--green-50);
  color: #4e6155;
}

.markdown-preview pre {
  overflow-x: auto;
  padding: 14px;
  border-radius: 8px;
  background: #f1f4ef;
}

.markdown-preview code {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
}

.markdown-preview table {
  width: 100%;
  border-collapse: collapse;
}

.markdown-preview th,
.markdown-preview td {
  padding: 7px 9px;
  border: 1px solid var(--border);
  text-align: left;
}

.review-details {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fafbf8;
}

.review-details summary {
  padding: 12px 15px;
  color: #55665a;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.source-text {
  max-height: 300px;
  overflow: auto;
  margin: 0;
  padding: 0 15px 15px;
  color: var(--muted);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.image-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11.5px;
}

.image-count .svg-icon {
  width: 14px;
  height: 14px;
}

.success-panel {
  padding: 48px 30px;
  border: 1px solid #d2e1d2;
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.success-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
}

.success-icon .svg-icon {
  width: 28px;
  height: 28px;
}

.success-title {
  margin: 0 0 8px;
  font-size: 20px;
}

.success-description {
  margin: 0 auto 22px;
  color: var(--muted);
  font-size: 13px;
}

.table-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  white-space: nowrap;
}

.data-table th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #f8faf6;
  color: #5f6e65;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: left;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf0ea;
  color: #4e5e53;
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #fcfdfb;
}

.table-primary {
  color: var(--ink);
  font-weight: 600;
}

.table-secondary {
  margin-top: 2px;
  color: var(--muted-light);
  font-size: 11px;
}

.role-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.role-badge {
  background: var(--surface-soft);
  color: #617065;
}

.role-badge.admin {
  background: var(--green-100);
  color: var(--green-800);
}

.status-badge.enabled,
.status-badge.success {
  background: var(--success-soft);
  color: var(--success);
}

.status-badge.disabled,
.status-badge.neutral {
  background: #f0f1ee;
  color: #5f6e65;
}

.status-badge.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.table-action {
  padding: 5px 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--green-700);
  font-size: 11.5px;
  cursor: pointer;
}

.table-action:hover {
  background: var(--green-50);
}

.table-action.danger {
  color: var(--danger);
}

.table-action.danger:hover {
  background: var(--danger-soft);
}

.table-action:disabled {
  color: var(--muted-light);
  cursor: not-allowed;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(18, 34, 26, 0.42);
  backdrop-filter: blur(2px);
  animation: fade-in 0.12s ease;
}

.modal {
  width: min(100%, 480px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-overlay);
  animation: modal-in 0.16s ease;
}

.modal-lg {
  width: min(100%, 560px);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 23px 0;
}

.modal-title {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.45;
}

.modal-close {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.modal-close:hover {
  background: var(--surface-hover);
  color: var(--ink);
}

.modal-body {
  padding: 14px 23px 23px;
}

.modal-description {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fafbf8;
  color: #4d5e52;
  font-size: 12.5px;
  cursor: pointer;
}

.checkbox-label input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin: 2px 0 0;
  accent-color: var(--green-700);
}

.modal-error {
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 12px;
}

.toast-root {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  display: flex;
  width: min(360px, calc(100vw - 32px));
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #d4dfd3;
  border-radius: 11px;
  background: #fff;
  color: #425248;
  box-shadow: var(--shadow-overlay);
  font-size: 12.5px;
  line-height: 1.55;
  pointer-events: auto;
  animation: toast-in 0.18s ease;
}

.toast.error {
  border-color: #e5c6c1;
  color: #823b33;
}

.toast.success {
  border-color: #c9ddcb;
  color: #2e6544;
}

.toast .svg-icon {
  width: 17px;
  height: 17px;
  margin-top: 1px;
}

.toast-message {
  flex: 1;
}

.toast-close {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
}

.toast-close:hover {
  opacity: 1;
}

.sidebar-backdrop {
  display: none;
}

.login-page {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at 15% 12%, rgba(214, 227, 211, 0.52), transparent 31%),
    radial-gradient(circle at 88% 86%, rgba(225, 233, 216, 0.48), transparent 30%),
    var(--paper);
}

.login-card {
  width: min(100%, 410px);
  padding: 35px 34px 29px;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 50px rgba(20, 39, 30, 0.08);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 27px;
}

.login-brand .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}

.login-brand-name {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.login-title {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 23px;
  letter-spacing: -0.02em;
}

.login-description {
  margin: 0 0 25px;
  color: var(--muted);
  font-size: 13px;
}

.login-form .form-field {
  margin-bottom: 16px;
}

.code-field {
  display: flex;
  gap: 9px;
}

.code-field input {
  min-width: 0;
  flex: 1;
}

.code-field .btn {
  flex: 0 0 auto;
  padding-right: 12px;
  padding-left: 12px;
  font-size: 12px;
}

.login-submit {
  width: 100%;
  min-height: 43px;
  margin-top: 4px;
}

.login-note {
  margin: 19px 0 0;
  padding-top: 17px;
  border-top: 1px solid var(--border);
  color: var(--muted-light);
  font-size: 11.5px;
  text-align: center;
}

.login-error {
  margin: 0 0 14px;
  padding: 9px 11px;
  border: 1px solid #edd1cc;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12px;
}

.boot-screen {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  gap: 11px;
  color: var(--muted);
  font-size: 13px;
}

.visually-hidden {
  position: absolute !important;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(7px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .article-layout {
    display: block;
  }

  .right-rail {
    display: none;
  }

  .page-content {
    padding-right: 36px;
    padding-left: 36px;
  }

  .import-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
  }
}

@media (max-width: 900px) {
  .import-layout {
    grid-template-columns: 1fr;
  }

  .import-aside {
    order: -1;
  }

  .flow-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .flow-item {
    display: block;
    padding-bottom: 0;
  }

  .flow-item:not(:last-child)::after {
    display: none;
  }

  .flow-number {
    margin-bottom: 7px;
  }
}

@media (max-width: 760px) {
  .form-control,
  .sidebar-search input,
  .search-input-wrap input {
    font-size: 16px;
  }

  .sidebar {
    z-index: 70;
    width: min(286px, calc(100vw - 48px));
    transform: translateX(-102%);
    transition: transform 0.2s ease;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: block;
    border: 0;
    background: rgba(18, 34, 26, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .main-area {
    margin-left: 0;
  }

  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    height: 58px;
    align-items: center;
    gap: 10px;
    padding: 0 17px;
    border-bottom: 1px solid var(--border);
    background: rgba(251, 252, 248, 0.96);
    backdrop-filter: blur(8px);
  }

  .mobile-menu-button {
    display: grid;
    width: 35px;
    height: 35px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--green-800);
    cursor: pointer;
  }

  .mobile-title {
    overflow: hidden;
    flex: 1;
    color: var(--ink);
    font-size: 14px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-import {
    min-height: 33px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .page-content,
  .page-content.narrow,
  .page-content.editor-content {
    padding: 28px 18px 60px;
  }

  .page-header {
    display: block;
    margin-bottom: 23px;
  }

  .page-title {
    font-size: 26px;
  }

  .page-header-actions {
    margin-top: 16px;
    padding-top: 0;
  }

  .search-panel {
    padding: 0;
  }

  .search-form-large {
    flex-direction: column;
  }

  .search-form-large .btn {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 24px;
  }

  .stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .stat-card:first-child,
  .stat-card:last-child {
    padding-right: 0;
    padding-left: 0;
  }

  .stat-card:last-child {
    border-bottom: 0;
  }

  .stat-label {
    margin: 0;
  }

  .stat-value {
    font-size: 21px;
  }

  .stat-value.date-value {
    font-size: 14px;
  }

  .page-list-item {
    padding: 16px;
  }

  .page-list-top {
    gap: 12px;
  }

  .article-title {
    font-size: 27px;
  }

  .article-description {
    font-size: 14px;
  }

  .article-meta {
    gap: 7px 12px;
    margin-bottom: 20px;
  }

  .mobile-article-nav {
    display: block;
    margin: 0 0 22px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
  }

  .mobile-article-nav summary {
    color: var(--green-800);
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
  }

  .mobile-article-nav nav {
    margin-top: 10px;
  }

  .mobile-article-nav .toc-link {
    padding: 6px 0 6px 12px;
  }

  .mobile-source-grid {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }

  .mobile-source-grid > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    font-size: 12px;
  }

  .mobile-source-grid span {
    flex: 0 0 auto;
    color: var(--muted);
  }

  .mobile-source-grid strong {
    min-width: 0;
    color: var(--ink-soft);
    font-weight: 500;
    text-align: right;
    overflow-wrap: anywhere;
  }

  .article-body {
    font-size: 14.5px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .form-panel {
    padding: 0;
  }

  .form-actions {
    align-items: stretch;
  }

  .form-actions-left {
    flex-basis: 100%;
  }

  .form-actions .btn {
    flex: 1;
  }

  .dropzone {
    min-height: 235px;
    padding: 23px 17px;
  }

  .flow-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 18px;
  }

  .editor-toolbar {
    align-items: flex-start;
  }

  .editor-count {
    padding-top: 8px;
  }

  .markdown-editor,
  .markdown-preview {
    min-height: 330px;
  }

  .markdown-preview {
    padding: 16px;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 12px;
  }

  .modal {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 15px;
  }

  .modal-header {
    padding: 20px 19px 0;
  }

  .modal-body {
    padding: 13px 19px 20px;
  }

  .toast-root {
    right: 16px;
    bottom: 16px;
  }

  .login-card {
    padding: 29px 24px 25px;
  }
}

@media (max-width: 430px) {
  .page-header-actions .btn {
    flex: 1;
  }

  .section-heading-row {
    align-items: flex-start;
  }

  .page-list-top {
    display: block;
  }

  .version-badge {
    margin-top: 7px;
  }

  .code-field {
    flex-direction: column;
  }

  .code-field .btn {
    width: 100%;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
