@import url("fonts/LXGWWenKai.css");

@font-face {
  font-family: "Noto Sans SC";
  src: url("fonts/noto-sans-sc-chinese-simplified-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif SC";
  src: url("fonts/noto-serif-sc-chinese-simplified-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "LXGW ZhenKai";
  src: url("fonts/LXGWZhenKai.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Ubuntu Mono";
  src: url("fonts/ubuntu-mono-latin-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Long Cang";
  src: url("fonts/long-cang-chinese-simplified-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   基础
   -------------------------------------------------------------------------- */

:root {
  --violet: #4c1d95;
  --violet-deep: #2e1065;
  --violet-soft: #ede9fe;
  --lav: #f7f5ff;
  --white: #ffffff;
  --ink: #241c3a;
  --muted: #6f6885;
  --line: #ebe6f7;
  --sans: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", serif;
  --display: "LXGW WenKai", "LXGW ZhenKai", "Noto Serif SC", serif;
  --mono: "JetBrains Mono", "Ubuntu Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--violet);
  color: #fff;
}

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

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

.skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  transform: translateY(-180%);
}

.skip:focus {
  transform: none;
}

.wrap {
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   顶栏
   -------------------------------------------------------------------------- */

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.top-in {
  display: flex;
  align-items: center;
  gap: 14px 24px;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}

.top nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 14px;
}

.top nav a {
  color: var(--muted);
  transition: color 0.15s;
}

.top nav a:hover {
  color: var(--violet);
}

.gh-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--violet);
  transition: color 0.15s;
}

.gh-btn:hover {
  color: var(--violet-deep);
}

.gh-btn svg {
  width: 19px;
  height: 19px;
}

.menu-btn {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 16px;
  height: 1.6px;
  background: currentColor;
  transition: transform 0.2s;
}

.menu-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(3.3px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:nth-child(2) {
  transform: translateY(-3.3px) rotate(-45deg);
}

.mobile-menu {
  display: none;
}

/* --------------------------------------------------------------------------
   首屏
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100vh - 61px);
  min-height: calc(100svh - 61px);
  overflow: hidden;
  background: var(--lav);
  padding: clamp(40px, 5vw, 64px) 0;
}

.hero > .wrap {
  position: relative;
  z-index: 1;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  top: -22%;
  left: -12%;
  width: min(62vw, 860px);
  height: min(62vw, 860px);
  background: radial-gradient(circle, rgba(76, 29, 149, 0.06), rgba(76, 29, 149, 0) 72%);
  animation: hero-drift-a 34s ease-in-out infinite alternate;
}

.hero::after {
  right: -10%;
  bottom: -28%;
  width: min(52vw, 720px);
  height: min(52vw, 720px);
  background: radial-gradient(circle, rgba(124, 58, 237, 0.05), rgba(124, 58, 237, 0) 74%);
  animation: hero-drift-b 42s ease-in-out infinite alternate;
}

@keyframes hero-drift-a {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(7%, 5%, 0) scale(1.12);
  }
}

@keyframes hero-drift-b {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-6%, -4%, 0) scale(1.1);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--violet);
}

.eyebrow span {
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.hero h1 {
  margin: 18px 0 0;
  font-family: "LXGW ZhenKai", "LXGW WenKai", serif;
  font-size: clamp(46px, 6.2vw, 78px);
  line-height: 1.06;
  letter-spacing: 0;
  font-weight: 800;
  color: var(--violet);
}

.hero h1 em {
  font-style: normal;
  color: var(--violet-deep);
}

.hero-en {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
  color: var(--violet);
}

.hero-intro {
  margin: 20px 0 0;
  max-width: 34em;
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 24px -14px rgba(76, 29, 149, 0.7);
  transition: background 0.15s, transform 0.15s;
}

.btn:hover {
  background: var(--violet-deep);
  transform: translateY(-1px);
}

.text-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--violet);
  border-bottom: 2px solid var(--violet-soft);
  padding-bottom: 2px;
}

.text-link:hover {
  border-bottom-color: var(--violet);
}

.catalog-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 420px;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.catalog-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.catalog-stats div:first-child {
  padding-left: 0;
  border-left: 0;
}

.catalog-stats b {
  font-family: var(--mono);
  font-size: clamp(30px, 3.2vw, 38px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--violet);
  font-variant-numeric: tabular-nums;
}

.catalog-stats span {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.hero-art {
  justify-self: end;
  width: min(100%, 440px);
}

.pendulum {
  width: 100%;
}

#pendulum {
  display: block;
  width: 100%;
  height: clamp(220px, 24vw, 300px);
}

.pendulum-controls {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.pendulum-controls label {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.pendulum-controls input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 18px;
  margin: 0;
  background: transparent;
}

.pendulum-controls input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: var(--violet-soft);
}

.pendulum-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4.5px;
  border: 0;
  border-radius: 50%;
  background: var(--violet);
}

.pendulum-controls input[type="range"]::-moz-range-track {
  height: 3px;
  border-radius: 2px;
  background: var(--violet-soft);
}

.pendulum-controls input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--violet);
}

.pendulum-controls output {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pendulum-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.pendulum-meta button {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--violet);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.pendulum-meta button:hover {
  background: var(--violet-soft);
  border-color: var(--violet-soft);
}

.pendulum-meta b {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--ink);
}

.pendulum-note {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   章节
   -------------------------------------------------------------------------- */

.sec {
  padding: clamp(56px, 7vw, 84px) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 84px;
}

.sec-in {
  max-width: 860px;
}

.sec-label {
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--violet);
}

.sec h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(27px, 3.2vw, 36px);
  line-height: 1.22;
  letter-spacing: 0;
  font-weight: 700;
}

.lead {
  margin: 16px 0 0;
  max-width: 36em;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--muted);
}

.prose {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 44px;
  margin-top: 18px;
}

.prose p {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 30px;
  border-top: 2px solid var(--violet);
}

.timeline div {
  padding: 14px 20px 0 0;
  border-right: 1px solid var(--line);
}

.timeline div:last-child {
  border-right: 0;
}

.timeline b {
  display: block;
  font-family: var(--mono);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.1;
  color: var(--violet);
}

.timeline span {
  display: block;
  margin-top: 5px;
  max-width: 18em;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.quote {
  margin: 28px 0 0;
  padding: 2px 0 2px 20px;
  border-left: 3px solid var(--violet);
}

.quote p {
  margin: 0;
  max-width: 16em;
  font-family: var(--display);
  font-size: clamp(21px, 2.6vw, 28px);
  line-height: 1.4;
  letter-spacing: 0;
  font-weight: 700;
  color: var(--violet);
}

.quote cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* 目录 */
.catalog-tree {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 56px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.tree-col h3 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.tree-col h3 span {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--violet);
}

.tree-path {
  margin: -4px 0 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: #9b92b3;
}

.tree-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.95;
  color: var(--muted);
}

.tree-col li::before {
  content: "├─ ";
  color: #c3b6df;
}

.tree-col li em {
  margin-left: 3px;
  font-style: normal;
  font-size: 12px;
  color: #a49bbd;
}

.tree-col li:last-child::before {
  content: "└─ ";
}

.tree-note {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* 标准 */
.rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 44px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.rules li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.rules .code {
  padding-top: 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--violet);
}

.rules b {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
}

.rules p {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.baseline {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 2px solid var(--violet);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 700;
  color: var(--violet);
}

.baseline i {
  font-style: normal;
}

.baseline i + i::before {
  content: " · ";
  color: var(--violet-soft);
}

.fine {
  margin: 12px 0 0;
  max-width: 46em;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.rules-link {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.rules-link a {
  color: var(--violet);
  border-bottom: 1px solid var(--violet-soft);
}

.rules-link a:hover {
  border-bottom-color: var(--violet);
}

/* 工作流 */
.flowchart {
  position: relative;
  margin: 26px 0 0;
  padding-left: 46px;
}

.flowchart::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--line);
}

.fc-step {
  position: relative;
  margin-top: 16px;
}

.fc-step:first-child {
  margin-top: 0;
}

.fc-step + .fc-step::before {
  content: "";
  position: absolute;
  left: -35px;
  top: -11px;
  border: 4px solid transparent;
  border-top-color: var(--violet);
}

.fc-dot {
  position: absolute;
  left: -46px;
  top: 12px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--violet);
  border-radius: 50%;
  background: #fff;
  color: var(--violet);
  font-family: var(--mono);
  font-size: 12px;
}

.fc-dot--decision {
  background: var(--violet-soft);
}

.fc-node {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.fc-node--decision {
  border-color: #ddd3f0;
  background: #faf8ff;
}

.fc-node h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.fc-node p {
  margin: 0;
  max-width: 46em;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.fc-branches {
  margin: 8px 0 6px;
}

.fc-branch {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 54px;
  gap: 12px;
  align-items: baseline;
  padding: 7px 0;
  border-top: 1px solid #ebe3f7;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
}

.fc-branch:first-child {
  border-top: 0;
}

.fc-key {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--violet);
}

.fc-label {
  margin-left: 4px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.fc-return {
  font-size: 12.5px;
  color: #9a5b2d;
}

.fc-next {
  font-size: 12.5px;
  color: var(--muted);
}

.fc-node p.fc-note {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.flow-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--violet-soft);
  color: var(--violet);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.flow-tag--human {
  background: #f0edf5;
  color: var(--muted);
}

.flow code,
.triggers code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--violet-soft);
  color: var(--violet-deep);
  font-family: var(--mono);
  font-size: 12.5px;
}

.triggers {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.triggers h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
}

.triggers dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.triggers dl > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

.triggers dt {
  margin: 0;
}

.triggers dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.triggers > p {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

/* 投稿 */
.steps {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
}

.steps b {
  font-size: 26px;
  line-height: 1;
  color: var(--violet);
}

.steps h3 {
  margin: 0 0 3px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;
}

.steps p {
  margin: 0;
  max-width: 38em;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.join-note {
  margin: 22px 0 0;
  max-width: 50em;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.join-note b {
  color: var(--violet);
  font-weight: 600;
}

/* 404 */
.nf {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 61px);
  min-height: calc(100svh - 61px);
  padding: clamp(40px, 6vw, 80px) 0;
  background: var(--lav);
}

.nf-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(20px, 5vw, 64px);
  align-items: center;
}

.nf-code {
  margin: 0;
  font-family: "LXGW ZhenKai", "LXGW WenKai", serif;
  font-size: clamp(120px, 18vw, 240px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: #e1d7f5;
}

.nf-title {
  margin: 12px 0 0;
  font-family: var(--display);
  font-size: clamp(28px, 3.8vw, 42px);
  line-height: 1.25;
  font-weight: 700;
  color: var(--violet);
}

.nf-text {
  margin: 14px 0 0;
  max-width: 30em;
  font-size: 16px;
  line-height: 1.8;
  color: var(--muted);
}

.nf .actions {
  margin-top: 28px;
}

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */

.footer {
  padding: 40px 0 26px;
  background: var(--violet-deep);
  color: rgba(255, 255, 255, 0.7);
}

.footer-in {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  font-size: 14px;
}

.footer a {
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.15s;
}

.footer a:hover {
  color: #fff;
}

.footer .gh-btn {
  color: #fff;
}

.footer .gh-btn:hover {
  color: rgba(255, 255, 255, 0.7);
}

.footer-note {
  width: 100%;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.42);
}

.footer-legal {
  width: 100%;
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.5);
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .nf-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .nf-code {
    font-size: clamp(96px, 26vw, 150px);
  }

  .hero-art {
    justify-self: start;
    width: min(100%, 360px);
  }

  .hero h1 {
    font-size: clamp(44px, 11vw, 64px);
  }
}

@media (max-width: 700px) {
  .wrap {
    width: calc(100% - 40px);
  }

  .hero {
    min-height: calc(100svh - 57px);
    padding: 36px 0 40px;
  }

  .top-in {
    justify-content: flex-start;
    gap: 8px 12px;
  }

  .top .gh-btn {
    margin-left: auto;
  }

  .top nav {
    display: none;
  }

  .menu-btn {
    display: flex;
  }

  .mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: block;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -28px rgba(36, 28, 58, 0.45);
  }

  .mobile-menu[hidden] {
    display: none;
  }

  .mobile-menu nav {
    display: flex;
    flex-direction: column;
    padding: 6px 0;
  }

  .mobile-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
  }

  .mobile-menu a:last-child {
    border-bottom: 0;
  }

  .mobile-menu a::after {
    content: "›";
    font-size: 18px;
    line-height: 1;
    color: var(--muted);
  }

  .sec {
    scroll-margin-top: 88px;
  }

  .brand small {
    display: none;
  }

  .prose,
  .rules {
    grid-template-columns: 1fr;
  }

  .catalog-tree {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .triggers dl > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .flowchart {
    padding-left: 38px;
  }

  .flowchart::before {
    left: 11px;
  }

  .fc-dot {
    left: -38px;
    width: 26px;
    height: 26px;
  }

  .fc-step + .fc-step::before {
    left: -31px;
  }

  .fc-node {
    padding: 12px 14px;
  }

  .fc-branch {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .fc-return,
  .fc-next {
    grid-column: 2;
  }

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

  .timeline div {
    padding: 12px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .timeline div:last-child {
    border-bottom: 0;
  }

  .steps li {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
  }

  .steps b {
    font-size: 21px;
  }

  .footer-in {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 380px) {
  .brand {
    font-size: 12px;
  }
}

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

  .btn {
    transition: none;
  }

  .hero::before,
  .hero::after {
    animation: none;
  }
}

@media print {
  .top nav,
  .gh-btn,
  .actions,
  .skip,
  .footer {
    display: none;
  }

  .hero {
    background: #fff;
  }

  .sec {
    break-inside: avoid;
  }
}
