:root {
  --paper: #f8f3e5;
  --paper-card: #fffdf6;
  --ink: #29272d;
  --ink-soft: #625f66;
  --blue: #263f9a;
  --blue-soft: #edf1ff;
  --red: #c34f60;
  --green: #3f7b62;
  --purple: #75529c;
  --plumbing: #506780;
  --line: #b9d2ec;
  --margin: #e28d9a;
  --hand: "Segoe Print", "Bradley Hand", cursive;
  --sans: "Segoe UI", Arial, sans-serif;
  --mono: "Cascadia Code", Consolas, monospace;
  --shadow: 0 14px 38px rgba(48, 43, 31, 0.11);
  --radius: 20px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-width: 320px;
  padding: 0 0 88px;
  color: var(--ink);
  font-family: var(--sans);
  background: #d9d4c9;
  overflow-x: hidden;
}
button,
input {
  font: inherit;
}
.paper-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background: radial-gradient(
      circle at 20% 10%,
      rgba(255, 255, 255, 0.7),
      transparent 35%
    ),
    linear-gradient(
      90deg,
      transparent 0 55px,
      rgba(207, 80, 96, 0.12) 56px 58px,
      transparent 59px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(79, 133, 180, 0.1) 0 1px,
      transparent 1px 34px
    ),
    var(--paper);
}
.binder-holes {
  position: fixed;
  left: 17px;
  top: 100px;
  bottom: 90px;
  width: 22px;
  z-index: 30;
  pointer-events: none;
  background: radial-gradient(
      circle at 50% 17px,
      #b9b6ae 0 5px,
      #f8f3e5 5.5px 8px,
      transparent 8.5px
    )
    0 0/22px 54px repeat-y;
  filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, 0.16));
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
.book-header {
  width: min(1880px, calc(100% - 52px));
  margin: 22px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 26px;
  border: 1px solid rgba(55, 52, 55, 0.16);
  border-radius: 24px 24px 12px 12px;
  background: rgba(255, 253, 246, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.book-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid #27252a;
  border-radius: 50%;
  background: #fff;
}
.brand-mark svg {
  width: 44px;
  fill: #27252a;
}
.eyebrow {
  margin: 0 0 2px;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}
.book-header h1 {
  margin: 0;
  color: var(--blue);
  font-family: var(--hand);
  font-size: clamp(2.2rem, 4vw, 4.15rem);
  line-height: 0.95;
}
.book-subtitle {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.language-switch {
  display: flex;
  padding: 4px;
  border: 1px solid rgba(40, 38, 40, 0.16);
  border-radius: 12px;
  background: #fffdf7;
}
.language-btn {
  min-width: 44px;
  padding: 8px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-weight: 900;
  color: var(--ink-soft);
}
.language-btn.is-active {
  background: var(--blue);
  color: #fff;
}
.header-version {
  padding: 8px 12px;
  border: 1px dashed rgba(38, 63, 154, 0.35);
  border-radius: 999px;
  color: var(--blue);
  font: 800 0.75rem var(--mono);
  background: var(--blue-soft);
}
.page-tabs {
  width: min(1880px, calc(100% - 52px));
  margin: 12px auto 0;
  display: flex;
  align-items: end;
  gap: 5px;
  overflow-x: auto;
  padding: 4px 5px 0;
  scrollbar-width: thin;
}
.page-tab {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px 11px;
  border: 1px solid rgba(57, 53, 55, 0.2);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #e9e2d1;
  color: #5f5b58;
  cursor: pointer;
  box-shadow: 0 -3px 10px rgba(30, 25, 20, 0.05);
  transition: 0.18s;
}
.page-tab span {
  font: 700 0.63rem var(--mono);
  opacity: 0.55;
}
.page-tab b {
  font-size: 0.78rem;
  white-space: nowrap;
}
.page-tab:hover {
  transform: translateY(-2px);
  background: #f3eddf;
}
.page-tab.is-active {
  z-index: 2;
  padding-top: 13px;
  background: var(--paper-card);
  color: var(--blue);
  border-color: rgba(38, 63, 154, 0.3);
}
.notebook {
  width: min(1880px, calc(100% - 52px));
  margin: 0 auto;
  min-height: 720px;
  border: 1px solid rgba(57, 53, 55, 0.18);
  border-radius: 0 18px 24px 24px;
  background: rgba(255, 253, 246, 0.76);
  box-shadow: 0 22px 56px rgba(42, 37, 25, 0.15);
  overflow: hidden;
}
.notebook-page {
  display: none;
  min-height: 720px;
  padding: 24px 26px 34px;
  animation: pageIn 0.28s ease;
}
.notebook-page.is-active {
  display: block;
}
@keyframes pageIn {
  from {
    opacity: 0.3;
    transform: translateX(14px) rotateY(-1deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.page-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding-bottom: 13px;
  border-bottom: 2px solid rgba(38, 63, 154, 0.13);
}
.page-title-row h2 {
  margin: 0;
  color: var(--blue);
  font-family: var(--hand);
  font-size: clamp(2rem, 3vw, 3.25rem);
  line-height: 1;
}
.page-title-row p:not(.page-kicker) {
  max-width: 900px;
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 0.91rem;
}
.page-kicker {
  margin: 0 0 5px;
  color: var(--red);
  font: 800 0.68rem var(--mono);
  letter-spacing: 0.14em;
}
.stats-strip {
  display: flex;
  gap: 8px;
}
.stat-card {
  min-width: 82px;
  padding: 8px 12px;
  border: 1px solid rgba(55, 52, 55, 0.14);
  border-radius: 14px;
  background: #fff;
  text-align: center;
}
.stat-card strong {
  display: block;
  color: var(--blue);
  font: 800 1.25rem var(--mono);
}
.stat-card span {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--ink-soft);
}
.stat-card--porcelain strong {
  color: var(--green);
}
.stat-card--plumbing strong {
  color: var(--plumbing);
}
.commands-layout {
  display: grid;
  grid-template-columns: 235px minmax(620px, 1fr) 270px;
  gap: 20px;
  align-items: start;
}
.left-rail,
.right-rail {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 16px;
}
.sticky-note {
  position: relative;
  padding: 28px 19px 20px;
  background: #f6eaa7;
  border: 1px solid rgba(70, 62, 35, 0.28);
  box-shadow:
    6px 7px 0 rgba(96, 76, 35, 0.12),
    0 10px 24px rgba(46, 41, 28, 0.12);
  font-family: var(--hand);
  transform: rotate(-1deg);
}
.sticky-note p {
  margin: 0;
  text-align: center;
  font-size: 0.98rem;
}
.sticky-note em {
  color: #bd4855;
  font-style: normal;
  font-weight: 800;
}
.sticky-note .tape {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 66px;
  height: 23px;
  background: rgba(225, 102, 142, 0.68);
  transform: translateX(-50%) rotate(-4deg);
}
.heart {
  display: block;
  text-align: right;
  font-size: 1.35rem;
}
.filter-panel {
  padding: 15px;
  border: 1px solid rgba(56, 54, 56, 0.16);
  border-radius: 18px;
  background: rgba(255, 253, 246, 0.86);
  box-shadow: var(--shadow);
}
.filter-section + .filter-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(50, 47, 50, 0.2);
}
.filter-section h3,
.category-heading-row h3 {
  margin: 0 0 9px;
  font-family: var(--hand);
  font-size: 1.08rem;
  color: var(--blue);
}
.type-filter {
  display: grid;
  gap: 6px;
}
.type-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid rgba(43, 40, 43, 0.14);
  border-radius: 10px;
  background: #fffdf6;
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}
.type-btn small {
  display: grid;
  place-items: center;
  min-width: 27px;
  height: 22px;
  padding: 0 7px;
  border-radius: 99px;
  background: #eef1f5;
  color: #59636f;
}
.type-btn:hover,
.type-btn.is-active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}
.type-explainer {
  margin-top: 9px;
  padding: 10px 11px;
  border-radius: 12px;
  border-left: 4px solid;
}
.type-explainer strong {
  font-family: var(--mono);
  font-size: 0.78rem;
}
.type-explainer p {
  margin: 4px 0 0;
  font-size: 0.72rem;
  color: var(--ink-soft);
  line-height: 1.35;
}
.type-explainer--porcelain {
  background: #edf7f1;
  border-color: var(--green);
}
.type-explainer--plumbing {
  background: #edf1f6;
  border-color: var(--plumbing);
}
.level-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.level-btn {
  padding: 6px 8px;
  border: 1px dashed rgba(50, 47, 50, 0.25);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
}
.level-btn:hover,
.level-btn.is-active {
  background: #fff;
  border-style: solid;
  border-color: var(--purple);
  color: var(--purple);
}
.workspace {
  min-width: 0;
}
.toolbar {
  position: sticky;
  top: 10px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid rgba(55, 52, 55, 0.17);
  border-radius: 17px;
  background: rgba(248, 244, 232, 0.94);
  box-shadow: 0 9px 24px rgba(42, 38, 28, 0.1);
  backdrop-filter: blur(12px);
}
.search-control {
  display: flex;
  align-items: center;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #fff;
  transition:
    width 0.26s ease,
    border-color 0.2s;
  overflow: hidden;
  width: 42px;
  flex: 0 0 auto;
}
.search-control.is-open {
  width: min(520px, 62vw);
  border-color: rgba(38, 63, 154, 0.38);
  box-shadow: 0 0 0 3px rgba(36, 63, 154, 0.08);
}
.search-toggle,
.search-clear {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
}
.search-toggle svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.search-field {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.search-control.is-open .search-field {
  opacity: 1;
  pointer-events: auto;
}
.search-field input {
  width: 100%;
  height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
}
.search-clear {
  font-size: 1.4rem;
  color: #807a76;
}
.search-hint {
  margin-right: auto;
  color: var(--ink-soft);
  font-size: 0.72rem;
}
.paper-button {
  padding: 9px 13px;
  border: 2px solid var(--blue);
  border-radius: 10px;
  background: #fffdf6;
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(36, 63, 154, 0.14);
}
.paper-button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(36, 63, 154, 0.14);
}
.paper-button--compact {
  white-space: nowrap;
  font-size: 0.74rem;
}
.category-heading-row {
  margin: 17px 0 5px;
}
.category-bar {
  display: flex;
  gap: 7px;
  padding: 2px 2px 9px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 7px 9px 7px 11px;
  border: 1px solid rgba(55, 52, 55, 0.17);
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.78);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
}
.category-chip small {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 99px;
  background: rgba(36, 63, 154, 0.08);
  color: var(--ink-soft);
}
.category-chip:hover,
.category-chip.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.category-chip.is-active small,
.category-chip:hover small {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.summary-line {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 10px 3px;
}
.summary-line h3 {
  margin: 0;
  font-family: var(--hand);
  font-size: 1.5rem;
  color: var(--blue);
}
#result-count {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: right;
}
.command-list {
  display: grid;
  gap: 12px;
}
.command-group {
  border: 1px solid rgba(53, 50, 53, 0.15);
  border-radius: 16px;
  background: rgba(255, 253, 246, 0.64);
  box-shadow: 0 8px 20px rgba(42, 38, 28, 0.06);
  overflow: hidden;
}
.group-heading {
  width: 100%;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 0;
  border-bottom: 1px dashed rgba(50, 47, 50, 0.17);
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  text-align: left;
}
.group-heading__marker {
  width: 8px;
  height: 27px;
  border-radius: 99px;
  background: var(--category-color);
}
.group-heading__title {
  font-family: var(--hand);
  font-size: 1.05rem;
  font-weight: 800;
}
.group-heading__count {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 24px;
  padding: 0 7px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--category-color) 15%, white);
  color: var(--category-color);
  font-size: 0.72rem;
  font-weight: 900;
}
.group-heading svg {
  width: 18px;
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 2.1;
  transition: transform 0.2s;
}
.command-group.is-collapsed .group-heading {
  border-bottom: 0;
}
.command-group.is-collapsed .group-heading svg {
  transform: rotate(-90deg);
}
.command-group.is-collapsed .command-grid {
  display: none;
}
.command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}
.command-card {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 7px;
  padding: 11px;
  border: 1px solid rgba(48, 46, 48, 0.13);
  border-left: 4px solid var(--category-color);
  border-radius: 12px;
  background: var(--paper-card);
  transition: 0.16s;
}
.command-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(42, 38, 28, 0.1);
}
.command-card__top {
  display: flex;
  align-items: center;
  gap: 5px;
}
.command-index {
  margin-right: auto;
  color: #9a9391;
  font: 700 0.62rem var(--mono);
}
.type-badge,
.level-badge,
.modal-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.59rem;
  font-weight: 900;
}
.type-badge--porcelain {
  background: #e4f3e9 !important;
  color: #2f684f !important;
}
.type-badge--plumbing {
  background: #e7edf4 !important;
  color: #435b75 !important;
}
.level-badge {
  background: #f2eee4;
  color: #766f65;
}
.command-code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--blue);
  font: 800 0.8rem/1.4 var(--mono);
  white-space: nowrap;
}
.command-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.73rem;
  line-height: 1.38;
}
.command-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.icon-button,
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 31px;
  padding: 5px 8px;
  border: 1px solid rgba(48, 46, 48, 0.16);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--ink-soft);
}
.icon-button {
  width: 31px;
  padding: 0;
}
.icon-button svg,
.copy-button svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.icon-button:hover,
.copy-button:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
}
.terminal-card {
  overflow: hidden;
  border: 1px solid #343945;
  border-radius: 14px;
  background: #171b23;
  box-shadow: 0 10px 24px rgba(25, 27, 33, 0.18);
}
.terminal-card__top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 11px;
  background: #2c303a;
}
.terminal-card__top span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e46969;
}
.terminal-card__top span:nth-child(2) {
  background: #e9bd62;
}
.terminal-card__top span:nth-child(3) {
  background: #6fc687;
}
.terminal-card__top strong {
  margin-left: auto;
  color: #c8cbd1;
  font: 600 0.62rem var(--mono);
}
.terminal-card pre {
  min-height: 124px;
  margin: 0;
  padding: 13px;
  white-space: pre-wrap;
  color: #d9e4d9;
  font: 600 0.72rem/1.6 var(--mono);
}
.branch-sketch,
.pro-tip {
  padding: 14px;
  border: 1px solid rgba(53, 50, 53, 0.15);
  border-radius: 16px;
  background: rgba(255, 253, 246, 0.82);
  box-shadow: var(--shadow);
}
.branch-sketch h3 {
  margin: 0;
  color: var(--red);
  font-family: var(--hand);
  font-size: 1.25rem;
  text-decoration: underline;
}
.branch-sketch svg {
  width: 100%;
  margin-top: 4px;
}
.branch-line {
  fill: none;
  stroke: #4f5058;
  stroke-width: 3;
}
.branch-line--dash {
  stroke-dasharray: 6 5;
}
.node {
  stroke: #27272c;
  stroke-width: 2;
}
.node--main {
  fill: #4676bb;
}
.node--feature {
  fill: #58a66f;
}
.node--bugfix {
  fill: #9b6ac1;
}
.branch-sketch text {
  font: 700 12px var(--hand);
}
.pro-tip {
  border: 2px solid #d48c5e;
  transform: rotate(0.5deg);
}
.pro-tip__title {
  text-align: center;
  color: #b75d45;
  font-family: var(--hand);
  font-size: 1.2rem;
  font-weight: 800;
}
.pro-tip ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 0.74rem;
  line-height: 1.5;
}
.empty-state {
  text-align: center;
  padding: 50px 20px;
}
.empty-state > div {
  font-size: 3rem;
}
.empty-state h3 {
  font-family: var(--hand);
  font-size: 1.8rem;
}
.empty-state p {
  color: var(--ink-soft);
}
.workflow-page {
  background: linear-gradient(
      90deg,
      transparent 0 46px,
      rgba(226, 141, 154, 0.25) 47px 49px,
      transparent 50px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0 33px,
      rgba(83, 145, 193, 0.11) 34px 35px
    ),
    rgba(255, 253, 246, 0.72);
}
.workflow-shell {
  display: grid;
  grid-template-columns: 280px minmax(500px, 1fr) 350px;
  gap: 20px;
  align-items: start;
}
.workflow-config,
.workflow-steps,
.workflow-stage,
.branch-type-panel {
  border: 1px solid rgba(54, 51, 54, 0.16);
  border-radius: 18px;
  background: rgba(255, 253, 246, 0.9);
  box-shadow: var(--shadow);
}
.workflow-config {
  padding: 15px;
  position: sticky;
  top: 14px;
}
.workflow-config h3,
.workflow-steps h3,
.branch-type-panel h3 {
  margin: 0 0 10px;
  color: var(--blue);
  font-family: var(--hand);
  font-size: 1.28rem;
}
.form-field {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
}
.form-field span {
  font-size: 0.71rem;
  font-weight: 800;
  color: var(--ink-soft);
}
.form-field input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(45, 43, 45, 0.19);
  border-radius: 9px;
  background: #fff;
  outline: 0;
}
.form-field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(38, 63, 154, 0.1);
}
.workflow-safe {
  margin: 12px 0 0;
  padding: 10px;
  border-left: 4px solid #d98d4f;
  border-radius: 8px;
  background: #fff3df;
  color: #765538;
  font-size: 0.72rem;
  line-height: 1.4;
}
.workflow-steps {
  overflow: hidden;
}
.workflow-steps-header {
  padding: 14px;
  border-bottom: 1px dashed rgba(49, 46, 49, 0.18);
}
.workflow-steps-header p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.4;
}
.step-list {
  display: grid;
  max-height: 590px;
  overflow: auto;
}
.workflow-step {
  display: grid;
  grid-template-columns: 32px 1fr 19px;
  gap: 9px;
  align-items: center;
  width: 100%;
  padding: 11px 13px;
  border: 0;
  border-bottom: 1px solid rgba(49, 46, 49, 0.08);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.workflow-step:hover {
  background: rgba(38, 63, 154, 0.05);
}
.workflow-step.is-active {
  background: var(--blue-soft);
  box-shadow: inset 4px 0 var(--blue);
}
.workflow-step.is-done .step-number {
  background: var(--green);
  color: #fff;
}
.step-number {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: #ece8dd;
  color: #69645e;
  font: 800 0.68rem var(--mono);
}
.workflow-step strong {
  display: block;
  font-size: 0.77rem;
}
.workflow-step small {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font: 600 0.61rem var(--mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.step-check {
  color: var(--green);
  font-weight: 900;
}
.workflow-stage {
  padding: 16px;
}
.workflow-stage-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}
.workflow-stage-top h3 {
  margin: 0;
  color: var(--blue);
  font-family: var(--hand);
  font-size: 1.7rem;
  line-height: 1;
}
.workflow-progress {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eeeae1;
  color: var(--ink-soft);
  font: 800 0.68rem var(--mono);
}
.workflow-terminal {
  margin-top: 14px;
  border-radius: 14px;
  overflow: hidden;
  background: #171b23;
  box-shadow: 0 12px 25px rgba(22, 23, 29, 0.16);
}
.workflow-terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 11px;
  background: #2c303a;
  color: #ccd0d6;
  font: 600 0.65rem var(--mono);
}
.workflow-terminal-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e46969;
}
.workflow-terminal-bar i:nth-child(2) {
  background: #e9bd62;
}
.workflow-terminal-bar i:nth-child(3) {
  background: #6fc687;
}
.workflow-terminal-bar span {
  margin-left: auto;
}
.workflow-command {
  display: block;
  min-height: 128px;
  margin: 0;
  padding: 16px;
  color: #e4eadf;
  font: 600 0.78rem/1.7 var(--mono);
  white-space: pre-wrap;
}
.workflow-output {
  min-height: 73px;
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid #343945;
  color: #95cda3;
  font: 500 0.71rem/1.5 var(--mono);
  white-space: pre-wrap;
}
.workflow-note {
  margin: 13px 0 0;
  padding: 11px 12px;
  border-left: 4px solid #d6a349;
  border-radius: 8px;
  background: #fff6df;
  color: #6d5a34;
  font-size: 0.75rem;
  line-height: 1.45;
}
.workflow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.flow-button {
  padding: 9px 12px;
  border: 1px solid rgba(43, 40, 43, 0.18);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
}
.flow-button--primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.flow-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(38, 63, 154, 0.12);
}
.flow-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.branch-type-panel {
  grid-column: 1/-1;
  padding: 15px;
}
.branch-type-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.branch-type-card {
  padding: 11px;
  border: 1px solid rgba(50, 47, 50, 0.13);
  border-top: 4px solid var(--branch-tone);
  border-radius: 11px;
  background: #fff;
}
.branch-type-card code {
  color: var(--blue);
  font: 800 0.75rem var(--mono);
}
.branch-type-card p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.7rem;
  line-height: 1.4;
}
.branch-map {
  display: grid;
  gap: 8px;
  margin: -4px 0 18px;
  padding: 16px;
  border: 1px solid rgba(54, 51, 54, 0.14);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: auto;
}
.branch-line-row {
  display: grid;
  grid-template-columns: 95px 1fr 14px 1fr 14px 1fr 14px;
  align-items: center;
  min-width: 700px;
}
.branch-line-row b {
  font: 800 0.74rem var(--mono);
}
.branch-line-row span {
  height: 4px;
  background: var(--branch-color);
}
.branch-line-row i {
  width: 14px;
  height: 14px;
  border: 3px solid var(--branch-color);
  border-radius: 50%;
  background: #fff;
}
.branch-line-main {
  --branch-color: #355fa6;
}
.branch-line-dev {
  --branch-color: #7b55a2;
}
.branch-line-feature {
  --branch-color: #45a26a;
  grid-template-columns: 95px 1fr 14px 1fr 14px;
}
.branch-line-hotfix {
  --branch-color: #c45d5d;
  grid-template-columns: 95px 1fr 14px 1fr 14px;
}
.docs-page {
  background: linear-gradient(
      90deg,
      transparent 0 46px,
      rgba(226, 141, 154, 0.22) 47px 49px,
      transparent 50px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0 33px,
      rgba(83, 145, 193, 0.08) 34px 35px
    ),
    rgba(255, 253, 246, 0.76);
}
.architecture-application,
.patterns-application {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.architecture-application article,
.patterns-application article {
  padding: 13px;
  border: 1px solid rgba(54, 51, 54, 0.14);
  border-top: 4px solid var(--blue);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(42, 38, 28, 0.06);
}
.patterns-application article {
  border-top-color: var(--purple);
}
.architecture-application strong,
.patterns-application strong {
  color: var(--blue);
  font: 800 0.78rem var(--mono);
}
.patterns-application strong {
  color: var(--purple);
}
.architecture-application p,
.patterns-application p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 0.73rem;
  line-height: 1.42;
}
.markdown-document {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 38px;
  border: 1px solid rgba(54, 51, 54, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}
.markdown-document h1,
.markdown-document h2,
.markdown-document h3 {
  color: var(--blue);
  font-family: var(--hand);
  line-height: 1.05;
}
.markdown-document h1 {
  font-size: 2.4rem;
}
.markdown-document h2 {
  margin-top: 30px;
  font-size: 1.75rem;
  border-bottom: 1px dashed rgba(38, 63, 154, 0.25);
  padding-bottom: 5px;
}
.markdown-document h3 {
  font-size: 1.3rem;
}
.markdown-document p,
.markdown-document li {
  font-size: 0.87rem;
  line-height: 1.65;
}
.markdown-document blockquote {
  margin: 14px 0;
  padding: 10px 16px;
  border-left: 5px solid var(--purple);
  background: #f3eef9;
}
.markdown-document code {
  font-family: var(--mono);
  font-size: 0.82em;
  color: #a13c52;
}
.markdown-document pre {
  padding: 14px;
  border-radius: 12px;
  background: #171b23;
  color: #e3e8df;
  overflow: auto;
}
.markdown-document pre code {
  color: inherit;
}
.page-turner {
  width: min(1880px, calc(100% - 52px));
  margin: 12px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
.page-turner button {
  width: 40px;
  height: 35px;
  border: 1px solid rgba(54, 51, 54, 0.18);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  color: var(--blue);
  font-weight: 900;
}
.page-turner button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.page-turner span {
  color: var(--ink-soft);
  font: 700 0.72rem var(--mono);
}
.fixed-signature {
  position: fixed;
  left: 50%;
  bottom: 10px;
  z-index: 80;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 24px);
  padding: 6px 12px;
  border: 1px solid rgba(88, 107, 134, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 7px 20px rgba(39, 61, 91, 0.1);
  backdrop-filter: blur(10px);
  color: #526578;
  font-size: 0.68rem;
  white-space: nowrap;
}
.fixed-signature a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #315a87;
  text-decoration: none;
  font-weight: 800;
}
.fixed-signature a:hover {
  text-decoration: underline;
}
.signature-icon {
  font-size: 0.85rem;
}
.signature-separator {
  opacity: 0.4;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(28, 27, 31, 0.56);
  backdrop-filter: blur(5px);
}
.command-modal {
  position: relative;
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: 25px;
  border: 1px solid rgba(54, 51, 54, 0.2);
  border-radius: 20px;
  background: var(--paper-card);
  box-shadow: 0 25px 80px rgba(19, 18, 22, 0.35);
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 35px;
  height: 35px;
  border: 0;
  border-radius: 50%;
  background: #eeeae1;
  cursor: pointer;
  font-size: 1.4rem;
}
.modal-pills {
  display: flex;
  gap: 6px;
  padding-right: 42px;
}
.modal-pill {
  background: #eef0f4;
  color: #59636f;
}
.command-modal h2 {
  margin: 15px 0 7px;
  color: var(--blue);
  font: 800 1.35rem var(--mono);
}
.command-modal > p {
  color: var(--ink-soft);
  line-height: 1.55;
}
.modal-block {
  margin-top: 15px;
}
.modal-block h3 {
  margin: 0 0 7px;
  font-family: var(--hand);
  font-size: 1.2rem;
  color: var(--blue);
}
.code-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 11px;
  background: #171b23;
}
.code-box code {
  flex: 1;
  color: #e5eadf;
  font: 600 0.76rem/1.5 var(--mono);
  white-space: pre-wrap;
}
.copy-button--modal {
  border-color: #59636f;
  background: #2a303b;
  color: #e5eadf;
}
.modal-block--note {
  padding: 12px;
  border-left: 4px solid var(--blue);
  background: var(--blue-soft);
  border-radius: 9px;
}
.modal-block--note p,
.modal-tip p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.45;
}
.modal-tip {
  margin-top: 14px;
  padding: 12px;
  border-radius: 9px;
  background: #fff2dc;
}
.modal-tip strong {
  display: block;
  margin-bottom: 4px;
  color: #a36032;
}
.toast {
  position: fixed;
  right: 20px;
  bottom: 65px;
  z-index: 120;
  padding: 10px 14px;
  border-radius: 10px;
  background: #222831;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.2s;
}
.toast.is-visible {
  opacity: 1;
  transform: none;
}
.modal-open {
  overflow: hidden;
}
@media (max-width: 1450px) {
  .commands-layout {
    grid-template-columns: 220px minmax(560px, 1fr);
  }
  .right-rail {
    display: none;
  }
  .workflow-shell {
    grid-template-columns: 250px minmax(470px, 1fr);
  }
  .workflow-stage {
    grid-column: 2;
  }
  .branch-type-panel {
    grid-column: 1/-1;
  }
  .branch-type-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1050px) {
  .book-header,
  .page-tabs,
  .notebook,
  .page-turner {
    width: calc(100% - 28px);
  }
  .binder-holes {
    display: none;
  }
  .book-header {
    align-items: flex-start;
  }
  .book-subtitle {
    max-width: 620px;
  }
  .commands-layout {
    grid-template-columns: 1fr;
  }
  .left-rail {
    position: static;
    grid-template-columns: 260px 1fr;
  }
  .sticky-note {
    display: none;
  }
  .filter-panel {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 10px;
  }
  .filter-section + .filter-section {
    margin: 0;
    padding: 0;
    border: 0;
  }
  .type-explainer {
    margin: 0;
  }
  .command-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .workflow-shell {
    grid-template-columns: 1fr;
  }
  .workflow-config {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .workflow-config h3,
  .workflow-safe {
    grid-column: 1/-1;
  }
  .workflow-stage {
    grid-column: auto;
  }
  .step-list {
    max-height: 360px;
  }
  .branch-type-grid,
  .architecture-application,
  .patterns-application {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  body {
    padding-bottom: 82px;
  }
  .book-header {
    padding: 14px;
    flex-direction: column;
  }
  .brand-mark {
    width: 52px;
    height: 52px;
  }
  .brand-mark svg {
    width: 36px;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .book-header h1 {
    font-size: 2.5rem;
  }
  .page-tab {
    padding: 9px 11px;
  }
  .notebook-page {
    padding: 18px 14px 26px;
  }
  .page-title-row {
    flex-direction: column;
  }
  .stats-strip {
    width: 100%;
    overflow: auto;
  }
  .commands-layout {
    display: block;
  }
  .left-rail {
    display: block;
  }
  .filter-panel {
    display: block;
    margin-bottom: 14px;
  }
  .type-explainer {
    margin-top: 8px;
  }
  .filter-section + .filter-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed rgba(50, 47, 50, 0.2);
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .search-hint {
    display: none;
  }
  .search-control.is-open {
    width: calc(100% - 104px);
  }
  .paper-button--compact {
    margin-left: auto;
  }
  .command-grid {
    grid-template-columns: 1fr;
  }
  .summary-line {
    align-items: start;
    flex-direction: column;
    gap: 4px;
  }
  .workflow-config {
    grid-template-columns: 1fr;
  }
  .workflow-shell {
    display: block;
  }
  .workflow-steps,
  .workflow-stage,
  .workflow-config {
    margin-bottom: 14px;
  }
  .branch-type-grid,
  .architecture-application,
  .patterns-application {
    grid-template-columns: 1fr;
  }
  .markdown-document {
    padding: 20px 16px;
  }
  .fixed-signature {
    font-size: 0.62rem;
  }
  .signature-separator,
  .fixed-signature > span:last-child {
    display: none;
  }
}

/* =========================================================
   WIDE 3.1 — APPBAR, BUSCA FLUTUANTE E EXPLICAÇÕES
   ========================================================= */
.book-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 140;
  width: 100%;
  height: 72px;
  margin: 0;
  padding: 9px max(22px, calc((100vw - 1880px) / 2 + 26px));
  border: 0;
  border-bottom: 1px solid rgba(49, 55, 72, 0.13);
  border-radius: 0;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 8px 28px rgba(37, 43, 58, 0.09);
  backdrop-filter: blur(18px) saturate(135%);
}
.book-brand {
  min-width: 0;
  gap: 12px;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-width: 1.5px;
  box-shadow: 0 4px 12px rgba(34, 39, 51, 0.08);
}
.brand-mark svg {
  width: 30px;
}
.eyebrow {
  display: none;
}
.book-header h1 {
  font-size: clamp(1.55rem, 2.15vw, 2.25rem);
  line-height: 1;
  letter-spacing: -0.025em;
}
.book-subtitle {
  max-width: 720px;
  margin-top: 2px;
  overflow: hidden;
  color: #74727a;
  font-size: 0.72rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-actions {
  flex: 0 0 auto;
  gap: 9px;
}
.language-switch {
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}
.language-btn {
  min-width: 38px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 0.74rem;
}
.header-version {
  padding: 6px 10px;
  font-size: 0.67rem;
}
.page-tabs {
  position: sticky;
  top: 72px;
  z-index: 125;
  width: min(1880px, calc(100% - 52px));
  margin-top: 84px;
  padding: 6px 8px 0;
  border: 1px solid rgba(57, 53, 55, 0.1);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: rgba(242, 237, 226, 0.92);
  box-shadow: 0 -2px 12px rgba(37, 40, 51, 0.04);
  backdrop-filter: blur(14px);
}
.page-tab {
  padding-top: 9px;
  padding-bottom: 9px;
  box-shadow: none;
}
.page-tab.is-active {
  padding-top: 11px;
}
.notebook {
  border-top-color: rgba(57, 53, 55, 0.11);
}

/* Biblioteca recolhida e controle ao lado do título */
.summary-line {
  align-items: center;
  margin-top: 12px;
  margin-bottom: 10px;
}
.summary-title-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.summary-title-cluster h3 {
  white-space: nowrap;
}
.group-toggle-all {
  margin: 0;
  padding: 6px 10px;
  border: 1px solid rgba(38, 63, 154, 0.24);
  border-radius: 999px;
  background: rgba(237, 241, 255, 0.72);
  box-shadow: none;
  color: #40538d;
  font-size: 0.66rem;
  font-weight: 800;
}
.group-toggle-all:hover {
  transform: none;
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: none;
  color: #fff;
}

/* Pesquisa discreta e flutuante */
.floating-search {
  position: fixed;
  right: 22px;
  bottom: 76px;
  z-index: 150;
  display: flex;
  flex-direction: row-reverse;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 1px solid rgba(38, 63, 154, 0.2);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(32, 47, 91, 0.16);
  backdrop-filter: blur(14px);
  transition:
    width 0.26s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.floating-search.is-open {
  width: min(480px, calc(100vw - 44px));
  border-color: rgba(38, 63, 154, 0.42);
  box-shadow:
    0 12px 34px rgba(32, 47, 91, 0.2),
    0 0 0 3px rgba(38, 63, 154, 0.08);
}
.floating-search .search-toggle {
  width: 45px;
  height: 45px;
  border-radius: 13px;
  color: #40538d;
}
.floating-search .search-toggle:hover {
  background: var(--blue-soft);
  color: var(--blue);
}
.floating-search .search-toggle svg {
  width: 19px;
}
.floating-search .search-field {
  height: 44px;
  padding-left: 9px;
}
.floating-search .search-field input {
  min-width: 0;
  height: 44px;
  font-size: 0.78rem;
}
.floating-search .search-clear {
  width: 36px;
  height: 42px;
}
.toast {
  right: 22px;
  bottom: 132px;
}

/* Botões de explicação */
.explain-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(38, 63, 154, 0.2);
  border-radius: 999px;
  background: rgba(237, 241, 255, 0.7);
  color: #40538d;
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transition: 0.16s ease;
}
.explain-button > span,
.workflow-step-info > span {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font: 900 0.64rem/1 var(--sans);
}
.explain-button b {
  font: inherit;
}
.explain-button:hover {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.workflow-step-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: stretch;
  border-bottom: 1px solid rgba(49, 46, 49, 0.08);
  background: transparent;
  transition: background 0.16s ease;
}
.workflow-step-wrap:hover {
  background: rgba(38, 63, 154, 0.045);
}
.workflow-step-wrap.is-active {
  background: var(--blue-soft);
  box-shadow: inset 4px 0 var(--blue);
}
.workflow-step-wrap.is-done .step-number {
  background: var(--green);
  color: #fff;
}
.workflow-step {
  grid-template-columns: 32px minmax(0, 1fr) 19px;
  min-width: 0;
  border-bottom: 0;
  background: transparent !important;
  box-shadow: none !important;
}
.step-content {
  min-width: 0;
}
.workflow-step-info {
  display: grid;
  place-items: center;
  align-self: center;
  width: 30px;
  height: 30px;
  margin-right: 7px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #69728d;
  cursor: pointer;
}
.workflow-step-info:hover {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 4px 12px rgba(38, 63, 154, 0.12);
}
.workflow-note-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
}
.workflow-note-row .workflow-note {
  flex: 1;
  margin: 0;
}
.explain-button--stage {
  flex: 0 0 auto;
  margin-top: 1px;
}
.branch-type-card__head,
.reference-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}
.branch-type-card__head code,
.reference-card__head strong {
  min-width: 0;
}
.branch-type-card .explain-button,
.reference-card .explain-button {
  min-height: 27px;
  padding: 4px 7px;
  font-size: 0.59rem;
}
.branch-type-card .explain-button > span,
.reference-card .explain-button > span {
  width: 15px;
  height: 15px;
  font-size: 0.55rem;
}
.reference-card {
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}
.reference-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(42, 38, 28, 0.1);
}

/* Modal robusto para etapas, branches e referências */
#explanation-modal {
  z-index: 180;
}
.explanation-modal {
  width: min(980px, 100%);
  max-height: min(820px, calc(100vh - 36px));
}
.explanation-modal h2 {
  font-family: var(--hand);
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  line-height: 1.1;
}
.explanation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 17px;
}
.explanation-grid section {
  padding: 13px;
  border: 1px solid rgba(49, 54, 73, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
}
.explanation-grid h3 {
  margin: 0 0 6px;
  color: var(--blue);
  font-family: var(--hand);
  font-size: 1.05rem;
}
.explanation-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.79rem;
  line-height: 1.55;
}
.modal-tip--warning {
  border-left: 4px solid #c57a3d;
}
.explanation-modal .code-box {
  align-items: flex-start;
}
.explanation-modal .code-box code {
  max-height: 190px;
  overflow: auto;
}

@media (max-width: 900px) {
  .book-header {
    padding-right: 16px;
    padding-left: 16px;
  }
  .book-subtitle {
    max-width: 430px;
  }
  .summary-title-cluster {
    flex-wrap: wrap;
  }
  .explanation-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .book-header {
    height: 64px;
    padding: 8px 12px;
    flex-direction: row;
    align-items: center;
  }
  .brand-mark {
    width: 40px;
    height: 40px;
  }
  .brand-mark svg {
    width: 28px;
  }
  .book-header h1 {
    font-size: 1.38rem;
  }
  .book-subtitle,
  .header-version {
    display: none;
  }
  .header-actions {
    width: auto;
    margin-left: auto;
  }
  .page-tabs {
    top: 64px;
    width: calc(100% - 18px);
    margin-top: 72px;
    padding-right: 4px;
    padding-left: 4px;
  }
  .page-tab b {
    font-size: 0.7rem;
  }
  .summary-line {
    align-items: flex-start;
  }
  .summary-title-cluster {
    width: 100%;
  }
  .summary-title-cluster h3 {
    white-space: normal;
  }
  .group-toggle-all {
    margin-left: 0;
  }
  .floating-search {
    right: 14px;
    bottom: 72px;
  }
  .floating-search.is-open {
    width: calc(100vw - 28px);
  }
  .workflow-note-row {
    flex-direction: column;
  }
  .explain-button--stage {
    align-self: flex-end;
  }
  .branch-type-card__head,
  .reference-card__head {
    align-items: flex-start;
  }
  .branch-type-card .explain-button b,
  .reference-card .explain-button b {
    display: none;
  }
  .explanation-modal {
    padding: 20px 16px;
  }
  .explanation-grid {
    gap: 8px;
  }
  .fixed-signature {
    bottom: 8px;
  }
}

.modal-backdrop {
  z-index: 170;
}
#explanation-modal {
  z-index: 180;
}
