.pkb-missing-link {
  color: #9b2d20;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.pkb-internal-link {
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.pkb-search-page {
  max-width: 760px;
}

.pkb-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 160px) minmax(130px, 180px) auto;
  gap: 0.65rem;
  align-items: end;
  margin: 1rem 0 2rem;
}

.pkb-search-form label {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  color: #767676;
  font-size: 0.78rem;
}

.pkb-search-form input,
.pkb-search-form select {
  box-sizing: border-box;
  width: 100%;
  min-height: 34px;
  padding: 0.45rem 0.55rem;
  border: 1px solid #dedbd4;
  border-radius: 4px;
  background: #fff;
  color: #1d1d1f;
  font: inherit;
  font-size: 0.88rem;
}

.pkb-search-form button {
  min-height: 34px;
  padding: 0.45rem 0.7rem;
  border: 1px solid #dedbd4;
  border-radius: 4px;
  background: #fff;
  color: #1d1d1f;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.pkb-search-form button:hover,
.pkb-search-form input:focus,
.pkb-search-form select:focus {
  border-color: #2f5f55;
  outline: 0;
}

.pkb-search-tag-panel {
  display: grid;
  grid-column: 1 / -1;
  gap: 0.65rem;
}

.pkb-search-selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 1.6rem;
}

.pkb-search-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.55rem;
  padding: 0 0.28rem 0 0.48rem;
  border-radius: 999px;
  background: #f1f0ec;
  color: #5f5f5f;
  font-size: 0.78rem;
  line-height: 1;
}

.pkb-search-tag-chip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}

.pkb-search-tag-chip button:hover {
  background: #dedbd4;
  color: #1d1d1f;
}

.pkb-search-tag-mode {
  display: inline-flex;
  gap: 0;
  width: max-content;
  margin: 0;
  padding: 0;
  border: 1px solid #dedbd4;
  border-radius: 4px;
  overflow: hidden;
}

.pkb-search-tag-mode[hidden] {
  display: none;
}

.pkb-search-tag-mode legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.pkb-search-tag-mode label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 1.7rem;
  padding: 0 0.5rem;
  color: #767676;
  font-size: 0.78rem;
  cursor: pointer;
}

.pkb-search-tag-mode label + label {
  border-left: 1px solid #dedbd4;
}

.pkb-search-tag-mode input {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.pkb-search-count {
  margin: 0 0 1rem;
  color: #767676;
  font-size: 0.8rem;
}

.pkb-search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem 0;
  border-top: 1px solid #dedbd4;
}

.pkb-search-result:last-child {
  border-bottom: 1px solid #dedbd4;
}

.pkb-search-result h2 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  line-height: 1.4;
}

.pkb-search-result h2 a {
  color: inherit;
  text-decoration: none;
}

.pkb-search-result h2 a:hover {
  color: #2f5f55;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.pkb-search-excerpt {
  margin: 0 0 0.55rem;
  color: #1d1d1f;
  font-size: 0.86rem;
  line-height: 1.65;
}

.pkb-search-meta,
.pkb-search-terms,
.pkb-preview-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
  margin: 0.35rem 0 0;
  color: #767676;
  font-size: 0.78rem;
}

.pkb-search-terms a,
.pkb-preview-terms a {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #f1f0ec;
  color: #5f5f5f;
  text-decoration: none;
}

.pkb-search-terms a:hover,
.pkb-preview-terms a:hover {
  color: #2f5f55;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pkb-preview-terms {
  font-size: small;
  gap: 0.28rem;
  margin-top: 0.32rem;
}

.pkb-preview-terms a {
  min-height: 1.1rem;
  padding: 0 0.3rem;
}

.pkb-search-thumb {
  display: block;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 4px;
}

.pkb-search-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 700px) {
  .pkb-search-page {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding-inline: 1rem;
  }

  .pkb-search-form {
    grid-template-columns: 1fr;
  }

  .pkb-search-result {
    grid-template-columns: minmax(0, 1fr);
  }

  .pkb-search-thumb {
    width: 72px;
    height: 72px;
  }
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  scroll-margin-top: 24px;
}

.pkb-heading-highlight,
.entry-content :target {
  animation: pkb-heading-highlight 1.6s ease-out;
  border-radius: 4px;
}

@keyframes pkb-heading-highlight {
  0% {
    background-color: rgba(47, 95, 85, 0.32);
    box-shadow: 0 0 0 10px rgba(47, 95, 85, 0.18);
  }
  45% {
    background-color: rgba(47, 95, 85, 0.2);
    box-shadow: 0 0 0 7px rgba(47, 95, 85, 0.12);
  }
  100% {
    background-color: transparent;
    box-shadow: 0 0 0 0 rgba(47, 95, 85, 0);
  }
}

.pkb-like-wrap,
.pkb-comment-like {
  margin: 1rem 0;
}

.pkb-comment-like {
  font-size: 0.85rem;
}

.pkb-comment-login-prompt {
  max-width: 560px;
  margin: 1rem 0 1.5rem;
  padding: 0.85rem 0;
  border-top: 1px solid #dedbd4;
  border-bottom: 1px solid #dedbd4;
  color: #767676;
  font-size: 0.9rem;
}

.pkb-comment-login-prompt p {
  margin: 0;
}

.pkb-comment-login-link {
  color: #333330;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pkb-comment-form-note {
  margin: 0 0 0.9rem;
  color: #767676;
  font-size: 0.82rem;
  line-height: 1.65;
}

.wp-block-comment-date {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pkb-comment-controls {
  display: inline-flex;
  align-items: baseline;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 0.22rem;
  color: #767676;
  font-size: 0.82rem;
  margin: 0;
  max-width: 560px;
  white-space: nowrap;
}

.pkb-comment-edit {
  display: inline;
  position: relative;
}

.pkb-comment-controls summary {
  display: inline;
  cursor: pointer;
  color: inherit;
  list-style: none;
}

.pkb-comment-controls summary::-webkit-details-marker {
  display: none;
}

.pkb-comment-delete-form {
  display: inline;
  margin: 0;
}

.pkb-comment-delete-form button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.pkb-comment-controls summary:hover,
.pkb-comment-delete-form button:hover {
  color: #333330;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pkb-comment-edit-form {
  background: #fbfaf7;
  border: 1px solid #dedbd4;
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  left: 0;
  margin: 0.5rem 0 0;
  min-width: min(560px, 80vw);
  padding: 0.75rem;
  position: absolute;
  top: 100%;
  white-space: normal;
  z-index: 30;
}

.pkb-comment-edit-form textarea {
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 0.6rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid #dedbd4;
  border-radius: 4px;
  background: #fff;
  color: #171717;
  font: inherit;
  resize: vertical;
}

.pkb-comment-edit-form button,
.pkb-comment-edit-form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.4rem 0.65rem;
  border: 1px solid #dedbd4;
  border-radius: 4px;
  background: #fff;
  color: #171717;
  font: inherit;
  cursor: pointer;
  margin-right: 0.35rem;
}

.pkb-comment-edit-form button:hover {
  border-color: #6c7f75;
}

.pkb-user-comments {
  max-width: 680px;
}

.pkb-user-comment {
  border-top: 1px solid #dedbd4;
  padding: 1rem 0;
}

.pkb-user-comment:first-child {
  border-top: 0;
}

.pkb-user-comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.35rem;
  color: #767676;
  font-size: 0.82rem;
  margin: 0 0 0.45rem;
}

.pkb-user-comment-meta .pkb-comment-controls {
  font-size: inherit;
}

.pkb-user-comment-content {
  font-size: 0.95rem;
}

.pkb-user-comment-content p {
  margin: 0 0 0.5rem;
}

.pkb-post-date-thumb-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  vertical-align: middle;
}

.pkb-post-date-thumb {
  border: 1px solid #dedbd4;
  border-radius: 4px;
  display: inline-flex;
  height: 26px;
  overflow: visible;
  position: relative;
  width: 26px;
}

.pkb-post-date-thumb > img {
  border-radius: 3px;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.pkb-post-date-thumb-preview {
  background: #fbfaf7;
  border: 1px solid #dedbd4;
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  left: 50%;
  opacity: 0;
  padding: 4px;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease;
  visibility: hidden;
  z-index: 20;
}

.pkb-post-date-thumb-preview img {
  display: block;
  max-height: 260px;
  max-width: 260px;
  object-fit: contain;
}

.pkb-post-date-thumb:hover .pkb-post-date-thumb-preview,
.pkb-post-date-thumb:focus .pkb-post-date-thumb-preview {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  visibility: visible;
}

@media (hover: none) {
  .pkb-post-date-thumb-preview {
    display: none;
  }
}

@media (max-width: 640px) {
  .pkb-comment-edit-form {
    left: auto;
    right: 0;
    min-width: min(320px, 82vw);
  }
}

.pkb-single-post-tags.wp-block-post-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.315rem;
  margin-top: 0.45rem;
  text-transform: none;
}

.pkb-single-post-tags .wp-block-post-terms__separator {
  display: none;
}

.pkb-single-post-tags.wp-block-post-terms a {
  background: #eeeeec;
  border: 1px solid #dedbd4;
  border-radius: 999px;
  color: #5f5f5a;
  display: inline-block;
  font-size: calc(var(--wp--preset--font-size--medium) * 0.9);
  line-height: 1.4;
  padding: 0.144rem 0.495rem;
  text-decoration: none;
  text-transform: none;
}

.pkb-single-post-tags.wp-block-post-terms a::before {
  content: "#";
}

.pkb-single-post-tags.wp-block-post-terms a:hover {
  background: #e5e2dc;
  border-color: #cfcac1;
  color: #333330;
}

.pkb-graph {
  position: relative;
}

.pkb-graph svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 500px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.pkb-graph.is-locked svg {
  cursor: default;
  filter: blur(1px);
  opacity: 0.72;
  touch-action: auto;
}

.pkb-graph-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  align-items: flex-start;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 100%;
  padding: 3.35rem 1rem 0.85rem;
  border: 0;
  background: rgba(255, 255, 255, 0.34);
  color: #5f5f5f;
  font: inherit;
  font-size: 0.84rem;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
}

.pkb-graph.is-locked .pkb-graph-lock-overlay {
  display: flex;
}

.pkb-graph-lock-overlay:hover,
.pkb-graph-lock-overlay:focus {
  background: rgba(255, 255, 255, 0.48);
  color: #2f5f55;
  outline: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (hover: none) {
  .pkb-graph-lock-overlay {
    background: rgba(255, 255, 255, 0.48);
    color: #2f5f55;
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}

.pkb-graph svg.is-dragging {
  cursor: grabbing;
}

.pkb-graph-node {
  cursor: pointer;
}

.pkb-graph-node circle,
.pkb-graph-node text,
.pkb-graph line {
  transition: fill 140ms ease, stroke 140ms ease, stroke-width 140ms ease, opacity 140ms ease;
}

.pkb-graph-node.is-hovered text {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.pkb-graph-node.is-dimmed {
  opacity: 0.38;
}

.pkb-graph line.is-dimmed {
  opacity: 0.18 !important;
}

.pkb-graph line.is-hovered {
  opacity: 0.9 !important;
}

.pkb-graph-label {
  cursor: pointer;
  font-size: 12px;
  dominant-baseline: middle;
}

.pkb-graph-tag-label {
  cursor: pointer;
  font-size: 10px;
  dominant-baseline: middle;
  transition: opacity 140ms ease;
}

.pkb-graph-empty {
  padding: 2rem 0;
  color: #767676;
}

.pkb-post-summary-panel .components-base-control {
  margin-bottom: 0.55rem;
}

.pkb-post-summary-count {
  margin: 0;
  color: #757575;
  font-size: 12px;
  line-height: 1.45;
}

.pkb-table-viewer-ready {
  position: relative;
}

.pkb-table-viewer-wrap {
  width: 100%;
  max-width: var(--wp--style--global--content-size, min(100% - 72px, 696px));
  margin-left: auto;
  margin-right: auto;
}

.pkb-table-expand-button {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: 1px solid rgba(222, 219, 212, 0.58);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.46);
  color: #1d1d1f;
  cursor: pointer;
  opacity: 0;
  transition: opacity 140ms ease, background 140ms ease, border-color 140ms ease;
}

.pkb-table-viewer-ready:hover .pkb-table-expand-button,
.pkb-table-expand-button:focus {
  opacity: 1;
}

@media (hover: none) {
  .pkb-table-expand-button {
    opacity: 1;
  }
}

.pkb-table-expand-button:hover,
.pkb-table-expand-button:focus {
  border-color: #2f5f55;
  background: rgba(255, 255, 255, 0.88);
  outline: 0;
}

.pkb-table-expand-button svg {
  display: block;
  width: 0.86rem;
  height: 0.86rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pkb-table-modal-button svg {
  display: block;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.pkb-table-modal-open {
  overflow: hidden;
}

.pkb-table-modal[hidden] {
  display: none;
}

.pkb-table-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: block;
}

.pkb-table-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(2px);
}

.pkb-table-modal-toolbar {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
  z-index: 2;
  display: flex;
  gap: 0.4rem;
}

.pkb-table-modal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 1px solid rgba(222, 219, 212, 0.95);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.86);
  color: #1d1d1f;
  cursor: pointer;
}

.pkb-table-modal-button:hover,
.pkb-table-modal-button:focus {
  border-color: #2f5f55;
  color: #2f5f55;
  outline: 0;
}

.pkb-table-modal-stage {
  position: absolute;
  inset: max(4.25rem, calc(env(safe-area-inset-top) + 3.5rem)) 0 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.pkb-table-modal-stage.is-dragging {
  cursor: grabbing;
}

.pkb-table-modal-content {
  --pkb-table-viewer-ratio: 1;
  --pkb-table-viewer-width: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  will-change: transform;
}

.pkb-table-modal-loading {
  min-width: 12rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(222, 219, 212, 0.95);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  color: #767676;
  font-size: 0.86rem;
  line-height: 1.4;
  text-align: center;
}

.pkb-table-modal-canvas {
  display: block;
  max-width: none;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  image-rendering: auto;
}

.pkb-table-capture-host {
  position: fixed;
  top: 0;
  left: -100000px;
  z-index: -1;
  display: block;
  width: max-content;
  max-width: none;
  overflow: visible;
  pointer-events: none;
}

.pkb-table-capture-figure.wp-block-table {
  display: block;
  width: max-content;
  max-width: none;
  margin: 0 !important;
  overflow: visible;
  background: #fff;
}

.pkb-table-capture-figure table {
  width: max-content !important;
  max-width: none !important;
  table-layout: auto !important;
  background: #fff;
}

.pkb-table-capture-math {
  display: inline-block;
  vertical-align: middle;
}

.pkb-table-capture-math.is-display {
  display: block;
  margin: 0.15rem 0;
  text-align: center;
}

.pkb-table-modal-figure.wp-block-table {
  display: block;
  width: max-content;
  max-width: none;
  margin: 0 !important;
  overflow: visible;
  box-shadow: none;
}

.pkb-table-modal-figure table {
  width: max-content !important;
  max-width: none !important;
  min-width: 0 !important;
  table-layout: auto !important;
  background: #fff;
  font-size: max(6px, calc(1em * var(--pkb-table-viewer-ratio)));
}

.pkb-table-modal-figure th,
.pkb-table-modal-figure td {
  min-width: max(2.5rem, calc(10rem * var(--pkb-table-viewer-ratio)));
  padding: max(0.12rem, calc(0.5em * var(--pkb-table-viewer-ratio)));
  line-height: 1.35;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.pkb-table-modal-content.is-fit-layout .pkb-table-modal-figure.wp-block-table {
  width: var(--pkb-table-viewer-width) !important;
}

.pkb-table-modal-content.is-fit-layout .pkb-table-modal-figure table {
  width: 100% !important;
  table-layout: fixed !important;
}

.pkb-table-modal-content.is-fit-layout .pkb-table-modal-figure th,
.pkb-table-modal-content.is-fit-layout .pkb-table-modal-figure td {
  min-width: 0;
}
