:root {
  color-scheme: dark;
  --bg: #080d14;
  --bg-elevated: rgba(14, 20, 31, 0.92);
  --bg-muted: rgba(255, 255, 255, 0.045);
  --bg-panel: rgba(255, 255, 255, 0.03);
  --bg-code: #0d1724;
  --text: #ebf1fb;
  --text-muted: #9ba9bf;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.34);
  --accent: rgba(100, 181, 167, 1);
  --accent-soft: rgba(100, 181, 167, 0.18);
  --accent-strong: #8fd9cc;
  --accent-warm: #ffc870;
  --danger: #ff8370;
  --success: #7fe0a0;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.22);
  --radius: 28px;
  --content-width: 1200px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6f2;
  --bg-elevated: rgba(255, 252, 247, 0.95);
  --bg-muted: rgba(11, 19, 34, 0.045);
  --bg-panel: rgba(255, 255, 255, 0.84);
  --bg-code: #edf3f0;
  --text: #17202c;
  --text-muted: #5e6c7f;
  --line: rgba(22, 34, 52, 0.12);
  --line-strong: rgba(22, 34, 52, 0.2);
  --accent: #167765;
  --accent-soft: rgba(22, 119, 101, 0.12);
  --accent-strong: #0f6454;
  --accent-warm: #b86b00;
  --danger: #b24a3d;
  --success: #1f8a46;
  --shadow: 0 20px 70px rgba(59, 76, 91, 0.14);
  --shadow-soft: 0 20px 60px rgba(59, 76, 91, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(100, 181, 167, 0.18), transparent 24%),
    radial-gradient(circle at 85% 0%, rgba(255, 200, 112, 0.12), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 22%),
    var(--bg);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

code,
pre {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
  padding: 18px 0;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(100, 181, 167, 0.22), rgba(100, 181, 167, 0.08));
  color: var(--accent-strong);
}

.brand__word {
  font-size: 19px;
}

.site-header__actions,
.hero__actions,
.section-heading__actions,
.closing__actions,
.demo-pills {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button,
.floating-toolbar button,
.composer button,
.heading-reactions button,
.feedback-item__delete,
.copy-code {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover,
.floating-toolbar button:hover,
.composer button:hover,
.heading-reactions button:hover,
.feedback-item__delete:hover,
.copy-code:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: rgba(100, 181, 167, 0.16);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 600;
}

.button--primary {
  border-color: rgba(100, 181, 167, 0.42);
  background: linear-gradient(180deg, rgba(100, 181, 167, 0.26), rgba(100, 181, 167, 0.14));
  color: var(--text);
}

.button--small {
  padding: 9px 14px;
  font-size: 14px;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

main {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
  padding: 34px 0 96px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: stretch;
  padding: 52px 0 40px;
}

.hero h1,
.section-heading h2,
.closing h2 {
  margin: 10px 0 0;
  font-size: clamp(3.25rem, 7vw, 6rem);
  line-height: 0.94;
  letter-spacing: -0.07em;
}

.hero__lede,
.closing p,
.spotlight-card p {
  max-width: 62ch;
  margin: 20px 0 0;
  font-size: 18px;
  color: var(--text-muted);
}

.hero__panel,
.spotlight-card,
.install-card,
.feature-card,
.demo-shell,
.closing {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.018)),
    var(--bg-panel);
  box-shadow: var(--shadow-soft);
}

.spotlight-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  padding: 28px;
  border-radius: var(--radius);
}

.spotlight-card__label,
.spotlight-card__meta span,
.demo-pill {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spotlight-card__title {
  margin-top: 12px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.spotlight-card__meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.spotlight-card__meta span,
.demo-pill {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-muted);
  color: var(--text-muted);
}

.install-card {
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: 22px;
}

.install-card__command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
}

.install-card code {
  overflow: auto;
  white-space: nowrap;
  font-size: 14px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 12px 0 36px;
}

.feature-card {
  padding: 22px;
  border-radius: 24px;
}

.feature-card__icon {
  font-size: 24px;
}

.feature-card h2 {
  margin: 16px 0 10px;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
}

.demo-section {
  padding-top: 28px;
  scroll-margin-top: 96px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: clamp(2.3rem, 4vw, 3.7rem);
}

.demo-hint {
  max-width: 36ch;
  color: var(--text-muted);
  text-align: right;
  font-size: 14px;
}

.demo-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 0;
  border-radius: 34px;
  overflow: hidden;
}

.demo-surface {
  min-width: 0;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.demo-surface__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.demo-surface__title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.doc-frame {
  padding: 1px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(100, 181, 167, 0.22), rgba(100, 181, 167, 0.02));
}

.doc-frame__inner {
  border-radius: 29px;
  background:
    radial-gradient(circle at top left, rgba(100, 181, 167, 0.07), transparent 20%),
    rgba(7, 11, 17, 0.76);
}

html[data-theme="light"] .doc-frame__inner {
  background:
    radial-gradient(circle at top left, rgba(22, 119, 101, 0.05), transparent 20%),
    rgba(255, 251, 246, 0.86);
}

.doc {
  width: 100%;
  min-height: 920px;
  padding: clamp(26px, 4vw, 52px);
  border-radius: 29px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.022)),
    var(--bg-panel);
}

.doc,
.ProseMirror {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 17px;
  line-height: 1.75;
}

.doc-loading {
  color: var(--text-muted);
}

.doc > :first-child,
.ProseMirror > :first-child {
  margin-top: 0;
}

.doc > :last-child,
.ProseMirror > :last-child {
  margin-bottom: 0;
}

.doc h1,
.doc h2,
.doc h3,
.doc h4,
.doc h5,
.doc h6,
.ProseMirror h1,
.ProseMirror h2,
.ProseMirror h3,
.ProseMirror h4,
.ProseMirror h5,
.ProseMirror h6 {
  scroll-margin-top: 110px;
  line-height: 1.12;
  letter-spacing: -0.04em;
  margin: 1.45em 0 0.5em;
}

.doc h1,
.ProseMirror h1 {
  font-size: clamp(2.8rem, 5.5vw, 4rem);
}

.doc h2,
.ProseMirror h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: var(--accent-strong);
}

.doc h3,
.ProseMirror h3 {
  font-size: clamp(1.35rem, 2.3vw, 1.7rem);
}

.md-block--heading[data-heading-depth="2"] h2,
.md-block--heading[data-heading-depth="3"] h3,
.ProseMirror .md-block--heading[data-heading-depth="2"],
.ProseMirror .md-block--heading[data-heading-depth="3"] {
  position: relative;
  padding-right: 116px;
}

.doc p,
.doc ul,
.doc ol,
.doc blockquote,
.doc pre,
.doc table,
.doc hr,
.ProseMirror p,
.ProseMirror ul,
.ProseMirror ol,
.ProseMirror blockquote,
.ProseMirror pre,
.ProseMirror table,
.ProseMirror hr {
  margin: 1em 0;
}

.doc a,
.ProseMirror a {
  color: var(--accent-strong);
}

.doc :not(pre) > code,
.ProseMirror :not(pre) > code,
.feedback-item__body :not(pre) > code {
  padding: 0.18em 0.42em;
  border-radius: 8px;
  background: var(--bg-code);
  border: 1px solid var(--line);
  font-size: 0.92em;
}

.doc ul,
.doc ol,
.ProseMirror ul,
.ProseMirror ol {
  padding-left: 1.4em;
}

.doc li + li,
.ProseMirror li + li {
  margin-top: 0.28em;
}

.ProseMirror ul[data-type="taskList"] {
  list-style: none;
  padding-left: 0;
}

.ProseMirror ul[data-type="taskList"] li {
  display: flex;
  gap: 12px;
}

.ProseMirror ul[data-type="taskList"] label {
  margin-top: 0.45em;
}

.ProseMirror input[type="checkbox"] {
  accent-color: var(--accent);
}

.doc blockquote,
.ProseMirror blockquote {
  padding: 0.8em 1.1em 0.8em 1.2em;
  border-left: 3px solid var(--accent);
  background: rgba(100, 181, 167, 0.08);
  border-radius: 0 16px 16px 0;
}

.doc hr,
.ProseMirror hr {
  border: 0;
  border-top: 1px solid var(--line);
}

.doc table,
.ProseMirror table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.doc th,
.doc td,
.ProseMirror th,
.ProseMirror td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.doc thead th,
.ProseMirror thead th {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.doc tbody tr:hover,
.ProseMirror tbody tr:hover {
  background: rgba(100, 181, 167, 0.08);
}

.ProseMirror .tableWrapper {
  overflow-x: auto;
}

.doc pre,
.ProseMirror pre {
  position: relative;
  margin: 0;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-code);
  padding: 18px 18px 20px;
}

.doc pre code,
.ProseMirror pre code {
  display: block;
  background: transparent;
  border: 0;
  padding: 0;
}

.md-block {
  position: relative;
  border-radius: 18px;
  padding: 6px 10px;
  margin: 0 -10px;
  transition: background 150ms ease, outline-color 150ms ease, opacity 150ms ease, transform 150ms ease;
}

.md-block:hover {
  background: rgba(255, 255, 255, 0.025);
}

.md-block.is-flash {
  animation: flashBlock 1.1s ease;
}

@keyframes flashBlock {
  0% {
    background: rgba(255, 200, 112, 0.26);
  }

  100% {
    background: transparent;
  }
}

.copy-code {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(7, 10, 16, 0.88);
  color: #e0e7f6;
}

.heading-reactions {
  position: fixed;
  display: flex;
  gap: 6px;
  z-index: 75;
  transform: translateY(-50%);
}

.heading-reactions[hidden] {
  display: none;
}

.heading-reactions button {
  min-width: 36px;
  padding: 6px 8px;
  font-size: 14px;
  line-height: 1;
}

.heading-reactions button[data-feedback-type="approve"] {
  border-color: rgba(127, 224, 160, 0.4);
  background: rgba(127, 224, 160, 0.12);
  color: var(--success);
}

.heading-reactions button[data-feedback-type="reject"] {
  border-color: rgba(255, 131, 112, 0.4);
  background: rgba(255, 131, 112, 0.12);
  color: var(--danger);
}

.heading-reactions button[data-feedback-type="comment"] {
  border-color: rgba(100, 181, 167, 0.4);
  background: rgba(100, 181, 167, 0.12);
  color: var(--accent);
}

.ProseMirror {
  min-height: 820px;
  outline: none;
  cursor: text;
}

.ProseMirror p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  color: var(--text-muted);
  pointer-events: none;
  height: 0;
}

.ProseMirror-selectednode {
  outline: 2px solid rgba(100, 181, 167, 0.46);
}

.hljs-comment,
.hljs-quote {
  color: #7f8da5;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-section,
.hljs-link {
  color: #ffb86c;
}

.hljs-string,
.hljs-title,
.hljs-name,
.hljs-attribute,
.hljs-template-tag,
.hljs-template-variable {
  color: #a5d6ff;
}

.hljs-number,
.hljs-symbol,
.hljs-bullet,
.hljs-variable,
.hljs-meta {
  color: #8fd9cc;
}

.hljs-built_in,
.hljs-type,
.hljs-class .hljs-title {
  color: #ffd97d;
}

.feedback-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
}

.feedback-panel__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.feedback-panel__title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.feedback-panel__count {
  min-width: 36px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(100, 181, 167, 0.16);
  text-align: center;
  font-weight: 600;
}

.feedback-panel__meta {
  color: var(--text-muted);
  font-size: 14px;
}

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

.feedback-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.028);
  padding: 14px;
}

.feedback-item:hover {
  border-color: var(--line-strong);
}

.feedback-item__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.feedback-item__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.feedback-item__delete {
  min-width: 34px;
  height: 34px;
  padding: 0;
}

.feedback-item__section {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feedback-item__body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

.feedback-item__jump {
  display: block;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  cursor: pointer;
}

.feedback-empty {
  padding: 20px 0;
  color: var(--text-muted);
}

.floating-toolbar {
  position: fixed;
  z-index: 80;
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.floating-toolbar button {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
}

.floating-toolbar button[data-active="true"] {
  background: rgba(100, 181, 167, 0.22);
  border-color: rgba(100, 181, 167, 0.45);
}

.composer {
  position: fixed;
  z-index: 90;
  width: min(360px, calc(100vw - 24px));
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.composer textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg-code);
  color: var(--text);
}

.composer__meta {
  color: var(--text-muted);
  font-size: 13px;
}

.composer__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.slash-menu {
  position: fixed;
  z-index: 85;
  width: min(280px, calc(100vw - 24px));
  padding: 8px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.slash-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.slash-menu button:hover,
.slash-menu button.is-active {
  background: rgba(100, 181, 167, 0.14);
}

.slash-menu small {
  display: block;
  color: var(--text-muted);
}

.status-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 95;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.closing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 34px;
  padding: 28px;
  border-radius: 28px;
}

.closing h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.button[aria-current="page"] {
  border-color: rgba(100, 181, 167, 0.42);
  background: linear-gradient(180deg, rgba(100, 181, 167, 0.2), rgba(100, 181, 167, 0.08));
}

.docs-hero {
  padding-bottom: 26px;
}

.docs-layout {
  display: grid;
  grid-template-columns: minmax(220px, 250px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.docs-nav,
.docs-callout {
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.018)),
    var(--bg-panel);
  box-shadow: var(--shadow-soft);
}

.docs-nav {
  position: sticky;
  top: 92px;
  padding: 18px;
}

.docs-nav__title {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.docs-nav ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.docs-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-muted);
  border: 1px solid transparent;
}

.docs-nav a:hover {
  color: var(--text);
  border-color: var(--line);
  background: var(--bg-muted);
}

.docs-content {
  min-width: 0;
}

.docs-content .doc {
  min-height: auto;
}

.docs-content section {
  scroll-margin-top: 110px;
}

.docs-content h1 {
  font-size: clamp(3rem, 6vw, 4.6rem);
}

.docs-content h2:first-of-type {
  margin-top: 0.4em;
}

.docs-callout {
  margin: 1.4em 0;
  padding: 18px 20px;
}

.docs-callout p {
  margin: 0;
  color: var(--text-muted);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .hero,
  .demo-shell,
  .closing,
  .docs-layout {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

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

  .demo-surface {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .demo-hint {
    text-align: left;
  }

  .docs-nav {
    position: static;
  }
}

@media (max-width: 780px) {
  .site-header,
  main {
    width: min(calc(100% - 24px), var(--content-width));
  }

  .site-header {
    flex-direction: column;
    align-items: stretch;
  }

  .site-header__actions {
    justify-content: flex-start;
  }

  .hero {
    padding-top: 30px;
  }

  .hero h1,
  .section-heading h2,
  .closing h2 {
    font-size: clamp(2.3rem, 11vw, 4rem);
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .demo-surface__topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .install-card__command {
    flex-direction: column;
    align-items: flex-start;
  }

  .doc {
    min-height: 720px;
    padding: 24px 18px 34px;
  }

  .docs-nav,
  .docs-callout {
    border-radius: 20px;
  }

  .ProseMirror {
    min-height: 640px;
  }
}
