@layer pages {
  .title-input {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    align-items: center;
    flex: 1;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: var(--input);
  }
  .new-document-form .title-input > input,
  .header-search .title-input > input,
  .mobile-search .title-input > input {
    width: 100%;
    min-width: 0;
    margin: 0;
    flex: 1;
    border: 0;
    border-radius: inherit;
    background: transparent;
  }
  .title-input > input:focus-visible {
    outline: 0;
  }
  .title-input[data-keyboard-focus]:has(> input:focus-visible) {
    outline: 1px solid var(--muted-2);
    outline-offset: 1px;
  }
  .title-input.has-namespace > input {
    padding-inline-start: 8px;
  }
  .title-input > .title-input-namespace {
    display: inline-flex;
    width: auto;
    min-width: 0;
    max-width: 55%;
    min-height: 0;
    margin: 0;
    padding: 0 11px;
    align-items: center;
    align-self: stretch;
    gap: 9px;
    flex: 0 1 auto;
    border: 0;
    border-inline-end: 1px solid var(--border-strong);
    border-radius: 3px 0 0 3px;
    background: var(--border);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
  }
  .title-input > .title-input-namespace[hidden] {
    display: none;
  }
  .title-input-namespace > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .title-input-remove {
    position: relative;
    width: 12px;
    height: 12px;
    flex: none;
    color: var(--muted);
  }
  .title-input-remove::before,
  .title-input-remove::after {
    position: absolute;
    inset: 0;
    content: "";
    background-color: currentColor;
    -webkit-mask: var(--icon-x) center / contain no-repeat;
    mask: var(--icon-x) center / contain no-repeat;
  }
  .title-input > .title-input-namespace:hover {
    background: var(--border-strong);
    color: var(--text);
  }
  .title-input-namespace:hover .title-input-remove {
    color: var(--text);
  }
  .title-input > .title-input-namespace:focus-visible {
    outline: 1px solid var(--muted-2);
    outline-offset: -3px;
  }
  .header-search > .title-input {
    width: 200px;
    min-height: 0;
    flex: none;
  }
  .header-search > .title-input,
  .mobile-search > .title-input {
    --border: rgba(242, 239, 233, 0.09);
    --border-strong: rgba(242, 239, 233, 0.17);
    --muted: #aaa59c;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  /* Search, new-document, and contribution pages */
  .actor-link {
    font-weight: 600;
  }

  .permission-dialog.new-document-dialog {
    width: min(620px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
  }

  /* The initial open dialog also works before enhancement or without scripts. */
  .new-document-dialog[open]:not(:modal) {
    position: fixed;
    inset: 0;
    z-index: 1000;
    height: fit-content;
  }

  html:has(dialog:modal, dialog[data-dialog-closing]) {
    overflow: hidden;
    scrollbar-gutter: stable;
  }

  .new-document-form {
    display: flex;
    min-height: 0;
    flex-direction: column;
  }

  .new-document-form {
    flex: 1;
  }

  .new-document-dialog .permission-dialog-heading,
  .new-document-dialog .permission-dialog-actions {
    flex-shrink: 0;
  }

  .new-document-dialog .permission-dialog-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .new-document-dialog[data-new-document-resizing] .permission-dialog-body {
    overflow-y: hidden;
  }

  .new-document-title-field {
    display: grid;
    gap: 8px;
  }

  .new-document-form label {
    font-weight: 600;
  }

  .new-document-form input {
    min-width: 0;
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: var(--input);
    color: var(--text);
    font: inherit;
    font-size: 16px;
  }

  .new-document-form .title-input > input,
  .new-document-form .title-input > .title-input-namespace {
    font-size: 16px;
    line-height: 1.5;
  }

  .new-document-dialog .permission-dialog-actions a {
    display: inline-flex;
    min-height: 36px;
    padding: 6px 14px;
    align-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 3px;
    background: var(--input);
    color: var(--text);
    text-decoration: none;
  }

  .new-document-dialog .permission-dialog-actions a:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .new-document-close {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 3px;
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
    text-decoration: none;
  }

  .new-document-close:hover {
    background: var(--surface-raised);
    color: var(--text);
  }

  .new-document-similar {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }

  .new-document-similar[data-concealed] {
    display: none;
  }

  .new-document-similar h3 {
    margin: 0 0 8px;
    font-size: 15px;
  }

  .new-document-similar-status {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
  }

  .new-document-similar-list {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .new-document-similar-list li {
    display: block;
    padding: 10px 0;
    border-top: 1px solid var(--border);
  }

  .new-document-similar-list li:first-child {
    border-top: 0;
  }

  .new-document-similar-list .search-result-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }

  .new-document-similar-list .search-result-heading a {
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .new-document-similar-list small {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
  }

  .new-document-similar-list .search-result-excerpt {
    margin: 5px 0 0;
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  .header-search input:focus-visible,
  .mobile-search input:focus-visible {
    outline: none;
  }

  .header-search:focus-within,
  .mobile-search:focus-within {
    outline: 1px solid var(--muted-2);
    outline-offset: 0;
  }

  .footer-primary nav {
    margin-left: auto;
    justify-content: flex-end;
  }

  @media (max-width: 820px) {
    .footer-primary nav {
      width: 100%;
      margin-left: 0;
      justify-content: flex-start;
    }
  }

  .contribution-list {
    margin: 0;
    padding-left: 28px;
  }

  .contribution-list li {
    padding: 3px 0;
    line-height: 1.35;
  }

  .contribution-list time {
    color: var(--text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  @media (max-width: 820px) {
    .primary-nav .menu span {
      display: inline;
    }

    .contribution-list {
      padding-left: 22px;
    }
  }

  .document-view-actions {
    position: relative;
    overflow: visible;
  }

  .file-metadata {
    margin-bottom: 22px;
    border: 1px solid var(--border-strong);
  }

  .file-preview {
    margin: 4px 0 20px;
  }

  .file-preview-stage {
    display: grid;
    min-height: 180px;
    place-items: center;
    padding: 20px;
    overflow: auto;
    border: 1px solid var(--border-strong);
    background: var(--surface);
  }

  .file-preview-stage a {
    display: block;
    max-width: 100%;
  }

  .file-preview-stage img {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: min(72vh, 860px);
    object-fit: contain;
  }

  .file-license-notice {
    position: relative;
    margin: 20px 0;
    padding: 22px 24px 20px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    font-weight: 400;
    overflow-wrap: anywhere;
  }

  .file-restricted-heading {
    min-height: 52px;
    padding-right: 130px;
  }

  .file-restricted-heading h2 {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.45;
  }

  .file-restricted-symbol {
    position: absolute;
    top: 18px;
    right: 26px;
    display: grid;
    width: 100px;
    height: 100px;
    place-items: center;
    border: 2px solid #a90012;
    border-radius: 50%;
    background: #e00018;
  }

  .file-restricted-symbol::before {
    position: absolute;
    inset: 10px;
    border: 7px solid #fff;
    border-radius: 50%;
    background: #d00015;
    content: "";
  }

  .file-restricted-symbol::after {
    position: relative;
    color: #fff;
    content: "C";
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 58px;
    font-weight: 900;
    line-height: 1;
  }

  .file-license-symbol {
    position: absolute;
    top: 18px;
    right: 26px;
    display: grid;
    width: 100px;
    height: 100px;
    place-items: center;
    border: 2px solid #14614f;
    border-radius: 50%;
    background: #1f806a;
  }

  .file-license-symbol::before {
    position: absolute;
    inset: 10px;
    border: 7px solid #fff;
    border-radius: 50%;
    background: #176f5b;
    content: "";
  }

  .file-license-symbol::after {
    position: relative;
    max-width: 76px;
    color: #fff;
    content: attr(data-badge);
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
  }

  .file-license-conditional .file-license-symbol {
    border-color: #7b4b00;
    background: #ad6d00;
  }

  .file-license-conditional .file-license-symbol::before {
    background: #925c00;
  }

  .file-license-symbol[data-badge="공공누리"]::after {
    font-size: 14px;
    letter-spacing: -0.06em;
  }

  .file-restricted-body {
    font-size: 14px;
    line-height: 1.7;
  }

  .file-restricted-body p {
    margin: 0 0 14px;
  }

  .file-restricted-body > p:first-child {
    padding-right: 130px;
  }

  .file-restricted-reference {
    font-weight: 600;
  }

  .file-restricted-body ol {
    margin: 0;
    padding-left: 24px;
  }

  .file-restricted-body li + li {
    margin-top: 7px;
  }

  .file-license-caution {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 13px;
  }

  .file-description {
    margin: 22px 0;
  }

  .file-metadata h2 {
    margin: 0;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-raised);
    font-size: 15px;
  }

  .file-metadata dl {
    margin: 0;
  }

  .file-metadata dl > div {
    display: grid;
    grid-template-columns: minmax(100px, 18%) 1fr;
    border-bottom: 1px solid var(--border);
  }

  .file-metadata dt,
  .file-metadata dd {
    margin: 0;
    padding: 8px 12px;
    overflow-wrap: anywhere;
  }

  .file-metadata dt {
    border-right: 1px solid var(--border);
    background: var(--surface-raised);
    font-weight: 600;
  }

  .file-metadata > p,
  .file-metadata-edit {
    display: block;
    margin: 10px 12px;
  }

  @media (max-width: 520px) {
    .file-preview-stage {
      min-height: 120px;
      padding: 12px;
    }
    .file-license-notice {
      padding: 16px;
    }
    .file-restricted-heading {
      min-height: 42px;
      padding-right: 88px;
    }
    .file-restricted-heading h2 {
      font-size: 17px;
    }
    .file-restricted-symbol {
      top: 15px;
      right: 15px;
      width: 70px;
      height: 70px;
      border-width: 1px;
    }
    .file-restricted-symbol::before {
      inset: 5px;
      border-width: 4px;
    }
    .file-restricted-symbol::after {
      font-size: 41px;
    }
    .file-license-symbol {
      top: 15px;
      right: 15px;
      width: 70px;
      height: 70px;
      border-width: 1px;
    }
    .file-license-symbol::before {
      inset: 5px;
      border-width: 4px;
    }
    .file-license-symbol::after {
      max-width: 54px;
      font-size: 17px;
    }
    .file-license-symbol[data-badge="공공누리"]::after {
      font-size: 10px;
    }
    .file-restricted-body > p:first-child {
      padding-right: 88px;
    }
    .file-metadata dl > div {
      grid-template-columns: 88px 1fr;
    }
  }

  .document-view-actions > a {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
  }

  .document-view-actions > a svg,
  .document-more > summary svg {
    width: 17px;
    height: 17px;
  }

  .document-toolbar {
    overflow: visible;
  }

  .document-toolbar > .document-action-link,
  .document-toolbar > .document-action-icon {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-right: 1px solid var(--border);
    white-space: nowrap;
  }

  .document-toolbar > .document-action-link.is-current,
  .document-toolbar > .document-action-link[aria-current="page"],
  .document-toolbar > .document-more.is-current > summary {
    box-shadow: inset 0 -2px var(--accent);
    color: var(--text);
  }

  .document-toolbar > .document-action-denied {
    min-width: 54px;
    padding: 8px 11px;
    color: var(--muted-2);
    cursor: pointer;
  }

  .document-toolbar > .document-action-denied:hover,
  .document-toolbar > .document-action-denied:focus-visible {
    background: var(--surface-raised);
    color: var(--text);
  }

  .document-lock-indicator {
    display: inline-grid;
    width: 12.25px;
    height: 14px;
    flex: 0 0 12.25px;
    margin-left: 1px;
    place-items: center;
  }

  .document-lock-indicator > .document-lock-icon {
    width: 100%;
    height: 100%;
  }

  .document-edit-restriction {
    display: flex;
    margin: 12px 0 14px;
    padding: 0;
    align-items: flex-start;
    gap: 8px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: inherit;
    line-height: 1.5;
  }

  .document-edit-restriction p {
    margin: 0;
  }

  .document-edit-restriction a {
    display: inline;
    vertical-align: baseline;
  }

  .document-edit-restriction-icon {
    display: inline-grid;
    width: 20px;
    height: 1lh;
    flex: 0 0 20px;
    place-items: center;
    color: var(--muted);
  }

  .document-edit-restriction-icon .document-lock-icon {
    width: 100%;
    height: 20px;

  }

  .document-edit-restriction-link-icon {
    display: inline-grid;
    width: 1em;
    height: .78em;
    margin-right: .2em;
    padding: .08em;
    place-items: center;
    vertical-align: baseline;
    border-radius: 2px;
    background: var(--link-external);
  }

  .document-edit-restriction-link-icon svg {
    width: 100%;
    height: 100%;
    fill: #fff;
  }

  .user-status-cards {
    display: grid;
    margin: 0 0 20px;
    gap: 10px;
  }

  .user-status-card {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    padding: 13px 15px;
    align-items: start;
    gap: 10px;
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--accent);
    background: var(--surface);
  }

  .user-status-card-blocked {
    border-left-color: var(--danger);
  }

  .user-status-card-icon {
    display: inline-grid;
    width: 20px;
    height: 20px;
    align-self: center;
    justify-self: center;
    place-items: center;
    color: var(--accent);
  }

  .user-status-card-blocked .user-status-card-icon {
    color: var(--danger);
  }

  .user-status-card-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
  }

  .wiki-content .user-status-card h2,
  .user-status-card h2 {
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--text);
    font-size: 15px;
    line-height: 1.4;
  }

  .user-status-card p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
  }

  .permission-dialog {
    width: min(440px, calc(100vw - 32px));
    min-height: 0;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: var(--surface);
    color: var(--text);
    flex-direction: column;
    overscroll-behavior: contain;
  }

  .permission-dialog.discussion-create-dialog {
    width: min(760px, calc(100vw - 32px));
  }

  .permission-dialog[open],
  .permission-dialog > form {
    display: flex;
  }

  .permission-dialog > form {
    min-height: 0;
    flex-direction: column;
  }

  .permission-dialog-heading,
  .permission-dialog-actions { flex-shrink: 0; }

  .permission-dialog::backdrop {
    background: rgb(0 0 0 / 0.62);
  }

  .permission-dialog-heading {
    display: flex;
    min-height: 48px;
    padding: 8px 9px 8px 14px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  .permission-dialog-heading h2 {
    margin: 0;
    font-size: 17px;
  }

  .permission-dialog-heading button {
    display: grid;
    width: 32px;
    height: 32px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
  }

  .permission-dialog-heading button:hover {
    background: var(--surface-raised);
    color: var(--text);
  }

  .permission-dialog-body {
    min-height: 0;
    padding: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .permission-dialog-message {
    margin: 0;
    overflow-wrap: anywhere;
    line-height: 1.6;
    white-space: pre-wrap;
  }

  .permission-dialog-reference {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
  }

  .permission-dialog-actions {
    display: flex;
    padding: 10px 12px;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid var(--border);
  }

  .permission-dialog-actions button {
    display: inline-flex;
    min-height: 36px;
    padding: 6px 14px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-strong);
    border-radius: 3px;
    background: var(--input);
    color: var(--text);
    font: inherit;
    cursor: pointer;
  }

  .permission-dialog-actions button:not(.primary-action):not(.danger-action):not(:disabled):hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .permission-dialog-actions .primary-action {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-contrast);
  }

  .permission-dialog-actions .primary-action:not(:disabled):hover {
    filter: brightness(1.08);
  }

  .permission-dialog-actions button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
  }

  .confirmation-dialog {
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
  }
  .confirmation-dialog .permission-dialog-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .confirmation-dialog :is(.permission-dialog-heading, .permission-dialog-actions) { flex-shrink: 0; }
  .confirmation-dialog .permission-dialog-actions { flex-wrap: wrap; }
  .confirmation-details {
    display: grid;
    grid-template-columns: minmax(72px, auto) minmax(0, 1fr);
    margin: 16px 0 0;
    gap: 10px 16px;
    font-size: 14px;
    line-height: 1.6;
  }
  .confirmation-details[hidden] { display: none; }
  .confirmation-details dt { color: var(--muted); }
  .confirmation-details dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
  .confirmation-dialog .permission-dialog-actions .danger-action {
    border-color: #c9364b;
    background: #c9364b;
    color: #fff;
  }
  .confirmation-dialog .permission-dialog-actions .danger-action:hover {
    border-color: #bd3147;
    background: #bd3147;
    color: #fff;
  }

  .document-delete-dialog > [data-document-delete-content],
  .document-delete-form {
    display: flex;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
  }
  .document-delete-form .permission-dialog-body {
    display: grid;
    gap: 12px;
  }
  .document-delete-form label { font-weight: 600; }
  .document-delete-form input[type="text"] {
    width: 100%;
    min-height: 40px;
    padding: 9px 10px;
    border: 1px solid var(--border-strong);
    border-radius: 3px;
    background: var(--input);
    color: var(--text);
    font: inherit;
  }
  .document-delete-form .form-submit-status { margin: 0; }
  .document-delete-form .form-submit-status:empty { display: none; }

  .document-toolbar > .document-watch-unavailable {
    width: 40px;
    min-width: 40px;
    color: var(--muted-2);
  }

  .document-action-icon {
    width: 40px;
    min-width: 40px !important;
    padding: 0 !important;
  }

  .document-more {
    position: relative;
  }

  .document-more > summary {
    display: grid;
    width: 40px;
    min-height: 40px;
    place-items: center;
    color: var(--muted);
    cursor: pointer;
    list-style: none;
  }

  .document-more > summary::-webkit-details-marker {
    display: none;
  }

  .document-more > summary:hover,
  .document-more[open] > summary {
    background: var(--accent-soft);
    color: var(--accent);
  }

  .document-menu {
    top: calc(100% + 7px);
    right: -1px;
    left: auto;
    z-index: 50;
    min-width: 180px;
  }

  .document-menu a {
    min-width: 0;
    text-align: left;
  }

  .document-menu a[aria-current="page"] {
    box-shadow: inset 2px 0 var(--accent);
    background: var(--surface-raised);
    color: var(--text);
  }

  .document-menu a.document-menu-danger {
    color: var(--danger);
  }

  .document-menu a.document-menu-danger:hover,
  .document-menu a.document-menu-danger:focus-visible {
    background: color-mix(in srgb, var(--danger) 12%, transparent);
  }

  .content-frame.diff-frame {
    min-height: 0;
  }

  .document-watch button {
    min-height: 40px;
  }

  .document-watch .wiki-star-icon,
  .document-action-icon .wiki-star-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
  }

  .document-watch.watched .wiki-star-icon {
    fill: currentColor;
  }

  @media (max-width: 820px) {
    .document-header > .document-toolbar {
      margin-left: 6px;
    }

    .document-view-actions {
      overflow: visible;
    }
  }

  @media (max-width: 350px) {
    .document-toolbar > .document-action-link,
    .document-toolbar > .document-action-denied {
      min-width: 0;
      padding-right: 6px;
      padding-left: 6px;
    }

    .document-view-actions > a {
      padding-right: 9px;
      padding-left: 9px;
    }
  }

  /* History, recent changes, and moderation pages */
  .history-body {
    padding-top: 18px;
  }





  .history-toolbar {
    display: flex;
    min-height: 36px;
    margin-bottom: 16px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .history-toolbar-primary {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
  }

  .history-toolbar .pagination {
    margin-top: 0;
  }

  .history-toolbar .pagination svg,
  .history-revision-jump svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
  }

  .history-revision-jump {
    display: inline-flex;
    height: 38px;
    overflow: hidden;
    align-items: stretch;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: var(--input);
  }

  .history-revision-prefix {
    display: inline-flex;
    padding-left: 9px;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
  }

  .history-revision-jump input {
    width: 72px;
    min-width: 0;
    padding: 6px 5px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
  }

  .history-revision-jump input::-webkit-inner-spin-button,
  .history-revision-jump input::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
  }

  .history-revision-jump input[type="number"] {
    appearance: textfield;
  }

  .history-revision-jump:focus-within {
    border-color: var(--accent);
    outline: 2px solid var(--accent-soft);
  }

  .history-revision-jump button {
    display: grid;
    width: 36px;
    padding: 0;
    place-items: center;
    border: 0;
    border-left: 1px solid var(--border);
    background: var(--surface-raised);
    color: var(--text);
    cursor: pointer;
  }

  .history-revision-jump button:hover {
    background: var(--accent-soft);
    color: var(--accent);
  }

  .history-list time,
  .history-list .actor {
    margin-left: 0;
    font-size: inherit;
  }

  .history-list time {
    color: var(--text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .history-inline-actions {
    color: var(--text);
    font-size: 10.6667px;
    white-space: nowrap;
  }

  .document-title-link {
    color: inherit;
  }

  .document-title-link:hover {
    color: var(--accent);
  }

  .document-title-namespace {
    box-shadow: inset 0 -.22em 0 var(--namespace-highlight);
  }

  .history-inline-actions a {
    color: var(--accent);
    font-weight: 600;
  }

  .history-inline-actions button {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
  }

  .history-inline-actions a:hover,
  .history-inline-actions button:hover {
    color: var(--accent-hover);
  }

  .history-list > li.is-vandal {
    position: relative;
    list-style: none;
  }

  .history-list > li.is-vandal::before {
    position: absolute;
    top: 12px;
    left: -14px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentcolor;
    content: "";
    transform: translateY(-50%);
  }

  .history-entry.is-vandal {
    font-size: 10px;
    line-height: 2;
    position: relative;
    top: 0.5px;
  }

  .history-entry.is-vandal .history-inline-actions {
    font-size: inherit;
  }

  .history-vandalized-record {
    text-decoration: none;
  }

  .history-vandalized-record > .history-operation,
  .history-vandalized-record > .history-author,
  .history-vandalized-record > .history-summary {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
  }

  .history-vandalized-record:hover > .history-operation,
  .history-vandalized-record:hover > .history-author,
  .history-vandalized-record:hover > .history-summary {
    text-decoration: none;
  }

  .history-entry.is-vandal .history-author .actor {
    gap: 3px;
  }

  .history-entry.is-vandal .history-author .actor-avatar {
    width: 12px;
    height: 12px;
  }

  .history-vandalized-note {
    color: var(--muted);
    white-space: nowrap;
  }

  .history-vandalized-note .actor {
    gap: 0;
  }

  .history-vandalized-note .actor-link {
    color: var(--accent);
  }

  .history-vandalized-note .actor:hover .actor-link {
    color: var(--accent-hover);
  }

  .history-vandalized-note .actor-avatar {
    display: none;
  }

  .history-vandal-form {
    display: none;
  }

  .history-revision {
    color: var(--text);
    font-weight: 700;
    white-space: nowrap;
  }

  .history-revision:hover {
    color: var(--accent);
  }

  .history-operation {
    color: var(--text);
    white-space: nowrap;
  }

  .history-operation.has-detail {
    white-space: normal;
  }

  .history-operation-detail {
    overflow-wrap: anywhere;
  }

  .history-delta {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .history-delta.positive {
    color: #45b95f;
  }

  .history-delta.negative {
    color: #e05a5a;
  }

  .history-delta.neutral,
  .change-summary {
    color: var(--muted);
  }



  .history-delta.neutral,
  .history-summary-text {
    color: var(--muted);
  }

  .history-summary,
  .history-summary-bracket {
    color: var(--text);
  }

  .history-author {
    white-space: nowrap;
  }

  .history-author .actor:hover,
  .history-author .actor:hover .actor-link {
    color: var(--accent-hover);
  }

  @media (max-width: 820px) {
    .history-body {
      padding-top: 14px;
    }



    .history-toolbar {
      margin-bottom: 12px;
      align-items: flex-start;
      flex-wrap: wrap;
    }

    .history-toolbar-primary {
      flex-wrap: wrap;
    }

    .record-list {
      padding-left: 22px;
    }

    .history-list time {
      display: inline;
    }

    .history-list .actor {
      display: inline-flex;
    }

    .history-inline-actions {
      white-space: normal;
    }
  }
  .edit-form select,
  .moderation-resolution select,
  .moderation-resolution input {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: var(--input);
    color: var(--text);
    font: inherit;
  }
  .form-success {
    padding: 10px 12px;
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
  }
.moderation-detail {
    min-width: 220px;
    max-width: 380px;
    white-space: pre-wrap;
  }
  .moderation-resolution {
    display: grid;
    min-width: 220px;
    gap: 6px;
  }
  .moderation-resolution .primary-action {
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    background: var(--accent);
    color: var(--accent-contrast);
    font: inherit;
    cursor: pointer;
  }

  .document-actions > a {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
  }

  .document-actions > a svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
  }

  .document-actions > a:not(.document-action-icon) > svg,
  .document-actions > form > .document-action-link > svg {
    transform: translateY(-1px);
  }

  /* Document editor */
  .editor-document-actions {
    overflow: visible;
  }

  .wiki-editor {
    gap: 10px;
  }

  .editor-shell {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: var(--input);
  }

  .editor-shell:not(.is-fullscreen):has(.editor-monaco :is(.suggest-widget.visible, .workbench-hover.compact)) {
    overflow: visible;
  }

  .editor-modebar,
  .editor-toolbar,
  .editor-statusbar {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-strong);
    background: var(--surface-raised);
  }

  .editor-modebar {
    min-height: 38px;
    padding: 0;
    align-items: end;
  }

  .editor-split-headings,
  .editor-split-preview-label,
  .editor-fullscreen-exit {
    display: none;
  }

  .editor-fullscreen-enter,
  .editor-shell.is-fullscreen .editor-fullscreen-exit {
    display: flex;
  }

  .editor-shell.is-fullscreen .editor-fullscreen-enter {
    display: none;
  }

  .editor-modebar .editor-fullscreen-action {
    display: grid;
    width: 39px;
    min-height: 0;
    margin-left: auto;
    padding: 0;
    align-self: stretch;
    place-items: center;
    flex: 0 0 39px;
    border: 0;
    border-left: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
  }

  .editor-modebar .editor-fullscreen-action:hover {
    background: var(--accent-soft);
    color: var(--accent);
  }

  .editor-modebar svg,
  .editor-toolbar svg {
    width: 17px;
    height: 17px;
  }

  .editor-actionbar {
    display: grid;
    min-width: 0;
  }

  .editor-actionbar > * {
    grid-area: 1 / 1;
  }

  .editor-shell:not(.is-fullscreen):has([data-editor-preview-tab][aria-selected="false"]) .editor-preview-toolbar,
  .editor-shell:not(.is-fullscreen):has([data-editor-preview-tab][aria-selected="true"]) .editor-toolbar {
    visibility: hidden;
  }

  .editor-toolbar {
    min-height: 38px;
    padding: 5px 7px;
    gap: 2px;
    border: 0;
    border-bottom: 1px solid var(--border-strong);
    border-radius: 0;
  }

  .editor-toolbar button {
    display: grid;
    width: 32px;
    height: 28px;
    padding: 0;
    flex: 0 0 32px;
    place-items: center;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
  }

  .editor-toolbar button:hover {
    background: var(--accent-soft);
    color: var(--accent);
  }

  .editor-insert-dialog {
    width: min(460px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: var(--surface);
    color: var(--text);
    flex-direction: column;
    overscroll-behavior: contain;
  }

  .editor-insert-dialog[open] { display: flex; }

  .editor-insert-dialog::backdrop {
    background: rgb(0 0 0 / 0.58);
  }

  .editor-insert-form {
    display: flex;
    min-height: 0;
    flex-direction: column;
  }

  .editor-insert-heading {
    display: flex;
    flex-shrink: 0;
    min-height: 50px;
    padding: 8px 10px 8px 16px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  .editor-insert-heading h2 {
    margin: 0;
    font-size: 17px;
  }

  .editor-insert-heading button {
    display: grid;
    width: 32px;
    height: 32px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
  }

  .editor-insert-heading button:hover {
    background: var(--surface-raised);
    color: var(--text);
  }

  .editor-insert-heading svg {
    width: 18px;
    height: 18px;
  }

  .editor-insert-body {
    display: grid;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px;
    gap: 14px;
  }

  .editor-insert-field {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
  }

  .editor-insert-field input {
    width: 100%;
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid var(--border-strong);
    border-radius: 3px;
    outline: 0;
    background: var(--input);
    color: var(--text);
    font: inherit;
    font-weight: 400;
  }

  .editor-insert-field input:focus-visible {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
  }

  .editor-check-field {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 7px;
    color: var(--text);
    cursor: pointer;
  }

  .editor-insert-actions {
    display: flex;
    flex-shrink: 0;
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    justify-content: flex-end;
    gap: 8px;
  }

  .editor-insert-actions button {
    min-width: 70px;
    min-height: 36px;
    padding: 6px 13px;
    border: 1px solid var(--border-strong);
    border-radius: 3px;
    background: var(--surface-raised);
    color: var(--text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
  }

  .editor-insert-actions .editor-insert-submit {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-contrast);
  }

  .editor-insert-actions button:hover {
    filter: brightness(1.08);
  }

  .editor-toolbar-separator {
    width: 1px;
    height: 24px;
    margin: 0 5px;
    flex: 0 0 1px;
    background: var(--border-strong);
  }

  .editor-source-pane[hidden],
  .editor-preview-pane[hidden] {
    display: none !important;
  }

  @keyframes editor-fallback-reveal {
    to {
      visibility: visible;
    }
  }

  .editor-source-pane[data-editor-enhancing] > * {
    visibility: hidden;
    animation: editor-fallback-reveal 0s 3s forwards;
  }

  .editor-code {
    position: relative;
    min-height: 380px;
    height: min(48vh, 560px);
    background: var(--input);
  }

  .editor-input-stack {
    position: relative;
    width: 100%;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    background: var(--input);
  }

  .editor-monaco {
    position: absolute;
    inset: 0;
    z-index: 3;
    /* Keep a layout box while hidden. Monaco created under display:none gets a
     zero-size input surface; Firefox then ignores typing and deletion. */
    visibility: hidden;
    pointer-events: none;
  }
  /* Monaco constrains action tooltips against the editor's right edge. A short
     label such as "Close (Escape)" can then wrap to two lines and grow back
     over the button it describes. Keep compact labels on one line and let the
     context view expand inward; these tooltips are descriptive-only, so they
     must not replace the button as the pointer target either. */
  .editor-monaco .monaco-hover.workbench-hover.compact {
    pointer-events: none;
  }
  .editor-monaco .monaco-hover.workbench-hover.compact .hover-contents {
    overflow-wrap: normal;
    white-space: nowrap !important;
  }
  .editor-monaco .context-view:has(.monaco-hover.workbench-hover.compact) {
    pointer-events: none;
    /* The bundled Monaco hover uses viewport coordinates in a page-relative context view. */
    translate: 0 var(--editor-page-scroll, 0px);
  }

  .editor-code.is-monaco-ready .editor-line-numbers,
  .editor-code.is-monaco-ready textarea[data-editor-input],
  .editor-code.is-monaco-ready .editor-highlight {
    display: none;
  }

  .editor-code.is-monaco-ready .editor-monaco {
    visibility: visible;
    pointer-events: auto;
  }

  .editor-code.is-monaco-ready .editor-input-stack {
    /* Avoid clipping Monaco's input textarea; Firefox drops key events when the
     focused inputarea is outside an overflow:hidden ancestor. */
    overflow: visible;
  }

  .editor-line-numbers {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 2;
    width: 48px;
    margin: 0;
    padding: 11px 9px 11px 4px;
    overflow: hidden;
    border-right: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-raised) 72%, transparent);
    color: var(--muted-2);
    font:
      13px/1.55 ui-monospace,
      SFMono-Regular,
      Consolas,
      monospace;
    text-align: right;
    user-select: none;
  }

  .edit-form .editor-code textarea[data-editor-input] {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 11px 13px 11px 61px;
    resize: none;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    color: transparent;
    caret-color: var(--text);
    font:
      14px/1.55 ui-monospace,
      SFMono-Regular,
      Consolas,
      "Liberation Mono",
      monospace;
    tab-size: 4;
    white-space: pre;
    -webkit-text-fill-color: transparent;
  }

  .edit-form .editor-code textarea[data-editor-input]::selection {
    background: rgba(79, 128, 187, 0.5);
    color: transparent;
  }

  .editor-highlight {
    position: absolute;
    inset: 0;
    height: 100%;
    margin: 0;
    padding: 11px 13px 11px 61px;
    overflow: auto;
    background: transparent;
    color: var(--text);
    font:
      14px/1.55 ui-monospace,
      SFMono-Regular,
      Consolas,
      "Liberation Mono",
      monospace;
    pointer-events: none;
    scrollbar-width: none;
    tab-size: 4;
    white-space: pre;
  }

  .editor-highlight::-webkit-scrollbar {
    display: none;
  }

  .syntax-delimiter,
  .syntax-table {
    color: var(--syntax-delimiter);
  }

  .syntax-table {
    font-weight: 700;
  }

  .syntax-keyword,
  .syntax-heading {
    color: var(--syntax-keyword);
  }

  .syntax-attribute {
    color: var(--syntax-attribute);
  }

  .syntax-string {
    color: var(--syntax-string);
  }

  .syntax-comment {
    color: var(--syntax-comment);
  }

  .syntax-brace {
    color: var(--syntax-brace);
  }

  .syntax-code {
    color: var(--syntax-code);
  }

  .syntax-heading-text,
  .syntax-strong {
    font-weight: 700;
  }

  .syntax-emphasis {
    font-style: italic;
  }

  .syntax-strike {
    text-decoration: line-through;
  }

  .syntax-underline {
    text-decoration: underline;
  }

  .syntax-superscript,
  .syntax-subscript {
    color: var(--syntax-script);
  }

  .editor-statusbar {
    min-height: 31px;
    padding: 5px 11px;
    justify-content: flex-end;
    gap: 18px;
    border-top: 1px solid var(--border-strong);
    border-bottom: 0;
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
  }

  .editor-preview-pane {
    background: var(--input);
  }

  .editor-preview-toolbar {
    display: flex;
    min-height: 33px;
    padding: 0 9px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-strong);
    background: var(--surface-raised);
    color: var(--muted);
    font-size: 13px;
  }

  .editor-preview-scroll {
    min-height: 380px;
    height: min(48vh, 560px);
    padding: 12px;
    overflow: auto;
  }

  .editor-preview-status {
    min-height: 31px;
    padding: 5px 11px;
    border-top: 1px solid var(--border-strong);
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    text-align: right;
  }

  .editor-preview-status:empty {
    display: none;
  }

  .wiki-editor #edit-summary {
    height: 34px;
    min-height: 34px;
    padding: 5px 10px;
    font-size: 14px;
  }

  .editor-license-consent {
    display: flex !important;
    margin-top: 6px;
    align-items: flex-start;
    gap: 9px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 400 !important;
    line-height: 1.55;
  }

  .editor-license-consent input {
    width: 17px;
    height: 17px;
    margin: 2px 0 0;
    flex: 0 0 17px;
    accent-color: var(--accent);
  }

  .editor-ip-notice {
    margin: 4px 0 0;
    color: #d83b3b;
    font-size: 14px;
    font-weight: 700;
    animation: editor-ip-notice-blink 1s infinite alternate;
  }

  .editor-ip-notice[data-ip-notice] {
    overflow: hidden;
  }

  .ip-notice-actions {
    flex-wrap: wrap;
  }

  .ip-notice-actions > .editor-ip-notice {
    flex: 1 1 220px;
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
  }

  @keyframes editor-ip-notice-blink {
    from {
      color: var(--text);
    }

    to {
      color: red;
    }
  }

  .editor-save-actions {
    margin-top: 4px;
  }

  .wiki-editor .editor-save-actions {
    flex-wrap: wrap;
  }

  .wiki-editor .editor-save-actions > .editor-license-consent {
    min-width: 0;
    margin: 0;
    flex: 1 1 240px;
  }

  .editor-fullscreen-open,
  html:has(.editor-shell.is-fullscreen) {
    overflow: hidden;
  }

  .editor-shell.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    padding: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 0;
    border: 0;
    border-radius: 0;
    background: var(--bg);
  }

  .editor-shell.is-fullscreen .editor-modebar {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .editor-shell.is-fullscreen .content-editor-tabs {
    display: none;
  }

  .editor-shell.is-fullscreen .editor-split-headings {
    display: contents;
  }

  .editor-shell.is-fullscreen .editor-split-headings > span {
    grid-row: 1;
    min-height: 38px;
    padding: 8px 12px;
    color: var(--text);
    font-size: 14px;
  }

  .editor-shell.is-fullscreen .editor-split-headings > span:first-child {
    grid-column: 1;
    border-right: 1px solid var(--border-strong);
  }

  .editor-shell.is-fullscreen .editor-split-headings > span:last-child {
    grid-column: 2;
    padding-right: 51px;
  }

  .editor-shell.is-fullscreen .editor-fullscreen-action {
    grid-area: 1 / 2;
    justify-self: end;
    margin: 0;
  }

  .editor-shell.is-fullscreen .editor-actionbar {
    display: contents;
  }

  .editor-shell.is-fullscreen .editor-actionbar > .editor-toolbar {
    grid-area: 2 / 1;
    border-right: 1px solid var(--border-strong);
  }

  .editor-shell.is-fullscreen .editor-actionbar > .editor-preview-toolbar {
    display: none;
  }

  .editor-shell.is-fullscreen .editor-source-pane {
    grid-area: 3 / 1;
  }

  .editor-shell.is-fullscreen .editor-preview-pane {
    grid-area: 2 / 2 / 4 / 3;
  }

  .editor-shell.is-fullscreen .editor-code {
    min-height: 0;
    height: auto;
    flex: 1;
  }

  .editor-shell.is-fullscreen .editor-source-pane,
  .editor-shell.is-fullscreen .editor-preview-pane {
    display: flex;
    min-width: 0;
    min-height: 0;
    border: 0;
    border-radius: 0;
    flex-direction: column;
    background: var(--input);
  }

  .editor-shell.is-fullscreen .editor-source-pane {
    /* Monaco positions completion lists and tooltips against the viewport.
     * Let those widgets cross the split while the editor clips its own text. */
    z-index: 1;
    border-right: 1px solid var(--border-strong);
  }

  .editor-shell.is-fullscreen .editor-preview-pane {
    overflow: hidden;
  }

  .editor-shell.is-fullscreen > .editor-statusbar {
    grid-area: 4 / 1 / 5 / -1;
  }

  .editor-shell.is-fullscreen .editor-preview-scroll {
    min-height: 0;
    height: auto;
    flex: 1;
  }

  @media (max-width: 1000px) {
    .editor-shell.is-fullscreen {
      grid-template-columns: minmax(0, 1fr);
      grid-template-rows: auto auto minmax(0, 1fr) auto minmax(0, 1fr) auto;
    }

    .editor-shell.is-fullscreen .editor-split-headings > span:first-child,
    .editor-shell.is-fullscreen .editor-actionbar > .editor-toolbar,
    .editor-shell.is-fullscreen .editor-source-pane {
      border-right: 0;
    }

    .editor-shell.is-fullscreen .editor-split-headings > span:last-child {
      display: none;
    }

    .editor-shell.is-fullscreen .editor-actionbar > .editor-preview-toolbar {
      grid-area: 4 / 1;
      display: flex;
      min-height: 38px;
      padding: 8px 12px;
      border-top: 1px solid var(--border-strong);
    }

    .editor-shell.is-fullscreen .editor-split-preview-label {
      display: inline;
      color: var(--text);
      font-size: 14px;
    }

    .editor-shell.is-fullscreen .editor-preview-pane {
      grid-area: 5 / 1;
    }

    .editor-shell.is-fullscreen > .editor-statusbar {
      grid-area: 6 / 1;
    }
  }

  @media (max-width: 820px) {
    .editor-document-actions {
      align-self: stretch;
    }

    .editor-code {
      min-height: 340px;
      height: 48vh;
    }

    .editor-line-numbers {
      width: 40px;
      padding-right: 7px;
      font-size: 12px;
    }

    .edit-form .editor-code textarea[data-editor-input] {
      min-height: 0;
      padding-left: 53px;
      font-size: 13px;
    }

    .editor-highlight {
      padding-left: 53px;
      font-size: 13px;
    }

    .editor-statusbar {
      justify-content: space-between;
      gap: 8px;
    }

    .editor-preview-scroll {
      min-height: 340px;
      height: 48vh;
      padding: 10px;
    }
  }

  .wiki-footnote-tooltip {
    position: fixed;
    inset: auto;
    margin: 0;
    z-index: 1400;
    width: max-content;
    max-width: min(720px, calc(100% - 24px));
    max-height: calc(100vh - 24px);
    overflow: auto;
    overflow-wrap: anywhere;
    padding: 12px 16px;
    border: 1px solid var(--footnote-border);
    border-inline-start: 2px solid var(--accent);
    border-radius: 4px;
    background: var(--footnote-background);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    pointer-events: auto;
  }

  .wiki-footnote-tooltip > .wiki-footnote-content {
    display: inline;
  }

  .wiki-footnote-tooltip[data-footnote-touch] {
    max-height: min(50vh, var(--footnote-touch-space, 50vh));
    max-height: min(50dvh, var(--footnote-touch-space, 50dvh));
    overscroll-behavior: contain;
  }

  .wiki-footnote-tooltip-number {
    font-weight: 500;
    font-variant-numeric: tabular-nums;
  }

  .document-actions > .document-action-danger,
  .danger-action {
    border-color: #c9364b;
    background: #c9364b;
    color: #fff;
  }

  .document-actions > .document-action-danger:hover,
  .danger-action:hover {
    border-color: #bd3147;
    background: #bd3147;
    color: #fff;
  }

  .wiki-categories {
    min-height: 30px;
    padding: 4px 8px;
    column-gap: 2px;
    font-size: 14px;
    line-height: 1.45;
  }

  .wiki-categories .wiki-category-list {
    align-items: center;
    gap: 2px 0;
  }

  .wiki-categories li,
  .wiki-categories a {
    display: inline-flex;
    align-items: center;
    line-height: inherit;
  }

  .wiki-section > summary {
    display: block;
  }

  .wiki-section > summary > [id],
  .wiki-section > summary .wiki-section-title[id] {
    /* Upward fragment navigation reveals the sticky header. */
    scroll-margin-top: 72px;
  }

  .wiki-section > summary h1,
  .wiki-section > summary h2,
  .wiki-section > summary h3,
  .wiki-section > summary h4,
  .wiki-section > summary h5,
  .wiki-section > summary h6 {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .wiki-section > summary .wiki-section-title {
    min-width: 0;
    flex: 1 1 auto;
  }

  .wiki-section > summary .wiki-section-number {
    flex: 0 0 auto;
  }

  .wiki-section-edit {
    margin-left: auto;
    padding: 3px 0;
    flex: 0 0 auto;
    align-self: center;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
  }

  .wiki-section-edit:hover {
    color: var(--accent-hover);
  }

  .wiki-toc-folding > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    list-style: none;
  }

  .wiki-toc-folding > summary::-webkit-details-marker {
    display: none;
  }

  .wiki-toc-folding > summary::after {
    width: 14px;
    height: 14px;
    color: var(--muted);
    content: "";
    background-color: currentColor;
    -webkit-mask: var(--icon-caret-down) center / contain no-repeat;
    mask: var(--icon-caret-down) center / contain no-repeat;
  }

  .wiki-toc-folding[open] > summary::after {
    transform: rotate(180deg);
  }

  .form-error {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-left: 3px solid #c94d4d;
    background: rgba(201, 77, 77, 0.1);
    color: var(--text);
  }

  .policy-denied-message {
    white-space: pre-line;
  }

  .error-layout {
    align-items: stretch;
  }

  .error-frame {
    justify-content: center;
  }

  .error-page {
    display: grid;
    width: 100%;
    padding: clamp(44px, 8vw, 88px) clamp(24px, 6vw, 72px);
    align-items: center;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
    gap: clamp(32px, 6vw, 96px);
  }

  .error-page-document {
    min-height: 100%;
    padding: clamp(28px, 5vw, 64px) clamp(12px, 4vw, 52px);
  }

  .error-document-body {
    display: flex;
    flex: 1;
  }

  .error-page-copy {
    min-width: 0;
  }

  .error-status {
    margin: 0;
    justify-self: center;
    color: var(--accent);
    font-size: clamp(156px, 20vw, 300px);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.085em;
    line-height: .8;
    white-space: nowrap;
    opacity: .18;
    user-select: none;
  }

  .error-page h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(32px, 4vw, 42px);
    line-height: 1.25;
    letter-spacing: -.025em;
  }

  .error-message {
    max-width: 620px;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.75;
    white-space: pre-line;
  }

  .error-actions {
    display: flex;
    margin-top: 12px;
    flex-wrap: wrap;
    gap: 9px;
  }

  .error-action {
    display: inline-flex;
    min-height: 42px;
    padding: 9px 15px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    font-weight: 600;
    transition:
      border-color 120ms ease,
      background-color 120ms ease,
      color 120ms ease;
  }

  .error-action-secondary {
    background: var(--surface-raised);
    color: var(--text);
  }

  .error-action-secondary:hover {
    border-color: var(--muted-2);
    background: var(--accent-soft);
    color: var(--accent);
  }

  .error-action-primary {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-contrast);
  }

  .error-action-primary:hover {
    border-color: var(--accent-hover);
    background: var(--accent-hover);
    color: var(--accent-contrast);
  }

  @media (max-width: 800px) {
    .error-page {
      grid-template-columns: minmax(0, 1fr);
      gap: 28px;
    }

    .error-page-copy {
      grid-row: 2;
    }

    .error-status {
      grid-row: 1;
      justify-self: start;
      font-size: clamp(112px, 33vw, 172px);
      opacity: .24;
    }
  }

  @media (max-width: 480px) {
    .error-page {
      padding: 42px 18px 54px;
    }

    .error-page-document {
      padding: 14px 0 24px;
    }

    .error-actions {
      align-items: stretch;
      flex-direction: column;
    }

    .error-action {
      width: 100%;
    }
  }

  /* Read-only legal pages */
  .legal-frame {
    width: 100%;
  }

  .legal-header {
    min-height: 88px;
    padding-bottom: 18px;
    align-items: center;
  }

  .legal-content {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 28px 32px 48px;
    line-height: 1.7;
  }

  .legal-content .wiki-toc-folding {
    margin-bottom: 1.5em;
  }

  .legal-content .wiki-section > h2,
  .legal-content .wiki-section > h3,
  .legal-content .wiki-section > h4,
  .legal-content .wiki-section > h5,
  .legal-content .wiki-section > h6 {
    padding-left: 0;
    scroll-margin-top: calc(50vh - 0.85em);
  }

  .legal-content .wiki-section-content > :last-child {
    margin-bottom: 0;
  }

  @media (max-width: 820px) {
    .legal-header {
      min-height: 0;
    }

    .legal-content {
      padding: 20px 16px 36px;
    }
  }

  /* Shared document action chrome */
  .actor {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    vertical-align: middle;
  }

  .actor-menu > summary.actor {
    display: flex;
  }

  .actor:hover .actor-link {
    color: var(--accent-hover);
  }

  .changes-table .actor,
  .changes-table .actor-link {
    color: var(--accent);
  }

  .changes-table .actor:hover,
  .changes-table .actor:hover .actor-link {
    color: var(--accent-hover);
  }

  .actor-avatar {
    display: block;
    width: var(--actor-avatar-size, 18px);
    height: var(--actor-avatar-size, 18px);
    flex: 0 0 auto;
    object-fit: cover;
    border: 1px solid var(--border-strong);
    background: var(--surface-raised);
  }

  .document-actions > form {
    display: flex;
  }

  .document-actions > form > .document-action-link {
    display: inline-flex;
    min-width: 54px;
    min-height: 40px;
    padding: 8px 11px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-right: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
  }

  .document-actions > form > .document-action-link svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
  }

  .document-actions > form:last-child > .document-action-link {
    border-right: 0;
  }

  .document-actions > form > .document-action-link:hover {
    background: var(--accent-soft);
    color: var(--accent);
  }

  .document-actions > .document-action-danger {
    border-color: #8f2838;
    background: #8f2838;
    color: #fff;
  }

  .document-actions > .document-action-danger:hover {
    background: #a93345;
    color: #fff;
  }

  .document-actions > form > .document-action-danger,
  .document-actions > form > .document-action-danger:hover {
    border-color: transparent;
    background: #c9364b;
    color: #fff;
  }

  .document-actions > form > .document-action-danger:hover {
    background: #bd3147;
  }

  /* Community boards */
  .board-home {
    display: grid;
    gap: 28px 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .board-section-wide {
    grid-column: 1 / -1;
  }

  .board-section-header {
    display: flex;
    padding-bottom: 8px;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border-strong);
  }

  .board-section-header h2 {
    margin: 0;
    font-size: 18px;
  }

  .board-section-header h2 a {
    color: var(--text);
  }

  .board-section-header h2 a:hover {
    color: var(--accent);
  }

  .board-write-link {
    color: var(--muted);
    font-size: 13px;
  }

  .board-policy-page .acl-group-detail > .acl-add {
    margin-top: 20px;
  }

  .board-template-settings {
    margin-top: 36px;
  }

  .board-template-settings .form-help {
    max-width: 820px;
    margin: 12px 0 16px;
    color: var(--muted);
    line-height: 1.6;
  }

  .board-template-settings code {
    color: var(--text);
  }

  .board-template-form {
    display: grid;
    max-width: 920px;
    gap: 8px;
  }

  .board-template-form label {
    font-weight: 600;
  }

  .board-template-form .content-editor-workspace {
    height: clamp(360px, 50vh, 600px);
  }

  .board-template-form textarea[data-content-editor-input] {
    width: 100%;
    min-height: 0;
    padding: 12px 14px;
    resize: none;
    border: 1px solid var(--border-strong);
    border-radius: 0 0 3px 3px;
    background: var(--input);
    color: var(--text);
    font: 13px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
  }

  .board-template-form .form-actions {
    margin-top: 4px;
  }

  .board-template-reset {
    max-width: 920px;
    margin-top: 8px;
    text-align: right;
  }

  .board-template-reset button {
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    cursor: pointer;
  }

  .board-template-reset button:hover {
    color: var(--accent);
  }

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

  .board-preview-list li {
    display: flex;
    min-height: 36px;
    padding: 7px 0;
    align-items: baseline;
    gap: 10px;
    border-bottom: 1px solid var(--border);
  }

  .board-preview-list time,
  .board-comment-count {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
  }

  .board-preview-list a {
    min-width: 0;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .board-preview-list a:hover {
    color: var(--accent);
  }

  .board-preview-title {
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: baseline;
    gap: 4px;
  }

  .board-preview-title > a {
    flex: 0 1 auto;
  }

  .board-preview-list time {
    margin-left: auto;
  }

  .board-empty {
    margin: 12px 0 0;
    color: var(--muted);
  }

  .board-list-body .data-table-empty {
    padding: 8px 0 0;
    border: 0;
  }

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

  .board-table th,
  .board-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
  }

  .board-table th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
  }

  .board-table td:first-child,
  .board-table th:first-child {
    width: 72px;
    color: var(--muted);
    white-space: nowrap;
  }

  .board-table .board-post-prefix,
  .board-table th:nth-child(2) {
    width: 94px;
    white-space: nowrap;
  }

  .board-table td:nth-child(4),
  .board-table th:nth-child(4) {
    width: 140px;
  }

  .board-table td:last-child,
  .board-table th:last-child {
    width: 110px;
    color: var(--muted);
    white-space: nowrap;
  }

  .board-table a {
    color: var(--text);
  }

  .board-table a:hover {
    color: var(--accent);
  }

  .board-table .actor-menu-popover a,
  .board-table .actor-menu-popover a:hover {
    color: revert-layer;
  }

  .board-table .board-post-tag,
  .board-post-tag {
    display: inline-flex;
    min-height: 20px;
    padding: 1px 5px;
    align-items: center;
    gap: 3px;
    border: 1px solid var(--border-strong);
    border-radius: 2px;
    background: color-mix(in srgb, var(--text) 7%, var(--surface-raised));
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
  }

  .board-post-prefix {
    display: table-cell;
  }

  .board-post-prefix .board-pin-label + .board-post-tag {
    margin-left: 4px;
  }

  .board-post-tag:hover {
    border-color: var(--muted-2);
    background: color-mix(in srgb, var(--text) 12%, var(--surface-raised));
    color: var(--text);
  }

  :where(.board-post-tag, .board-tag-filter, .board-write-tag-label)[data-board-tag="공지"] {
    --board-tag-icon: url("/assets/twemoji/1f4e2.svg");
  }

  :where(.board-post-tag, .board-tag-filter, .board-write-tag-label)[data-board-tag="신고"] {
    --board-tag-icon: url("/assets/twemoji/1f6a8.svg");
  }

  :where(.board-post-tag, .board-tag-filter, .board-write-tag-label)[data-board-tag="문의"] {
    --board-tag-icon: url("/assets/twemoji/2753.svg");
  }

  :where(.board-post-tag, .board-tag-filter, .board-write-tag-label)[data-board-tag="개선 제안"] {
    --board-tag-icon: url("/assets/twemoji/1f4a1.svg");
  }

  :where(.board-post-tag, .board-tag-filter, .board-write-tag-label)[data-board-tag="버그 제보"] {
    --board-tag-icon: url("/assets/twemoji/1f41b.svg");
  }

  :where(.board-post-tag, .board-tag-filter, .board-write-tag-label)[data-board-tag="소명"] {
    --board-tag-icon: url("/assets/twemoji/1f4dd.svg");
  }

  :where(.board-post-tag, .board-tag-filter, .board-write-tag-label)[data-board-tag="완료"] {
    --board-tag-icon: url("/assets/twemoji/2705.svg");
  }

  :where(.board-post-tag, .board-tag-filter, .board-write-tag-label)[data-board-tag="반려"] {
    --board-tag-icon: url("/assets/twemoji/26d4.svg");
  }

  .board-post-tag::before,
  .board-tag-filter[data-board-tag]::before,
  .board-write-tag-label[data-board-tag]::before {
    width: 1em;
    height: 1em;
    flex: 0 0 1em;
    background: var(--board-tag-icon) center / contain no-repeat;
    content: "";
  }

  .board-pin-label {
    display: inline-flex;
    min-height: 20px;
    padding: 1px 5px;
    align-items: center;
    border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--border-strong));
    border-radius: 2px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
  }

  .board-current-row {
    background: rgba(255, 255, 255, 0.03);
  }

  .board-post-heading {
    margin: 0 0 18px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--border);
  }

  .board-post-title-row {
    display: flex;
    margin: 0 0 7px;
    align-items: center;
    gap: 8px;
  }

  .board-post-title {
    display: flex;
    min-width: 0;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .board-post-meta {
    display: flex;
    margin: 0;
    padding: 0;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
  }

  .board-post-menu {
    min-width: 150px;
  }

  .board-tag-form {
    top: calc(100% + 5px);
    left: 0;
    min-width: 150px;
    padding: 4px 0;
  }
  .board-tag-form > button {
    display: flex;
    width: 100%;
    padding: 7px 12px;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
  }
  .board-tag-form > button:not(:disabled):hover {
    background: var(--accent-soft);
  }
  .board-tag-form > button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
  }

  .board-tag-control {
    position: relative;
    flex: 0 0 auto;
  }

  .board-tag-control > summary {
    cursor: pointer;
    list-style: none;
  }

  .board-tag-control > summary::-webkit-details-marker {
    display: none;
  }

  .board-tag-control > summary:hover,
  .board-tag-control[open] > summary {
    border-color: var(--accent);
    color: var(--text);
  }

  .board-tag-chevron {
    width: 11px;
    height: 11px;
  }
  .board-post-title-row > .board-post-tag {
    flex: 0 0 auto;
  }
  .board-tag-form button:disabled {
    opacity: 0.5;
    cursor: default;
  }

  .board-post-menu .document-menu-danger {
    color: var(--danger);
  }

  .board-post-menu .document-menu-danger:hover {
    background: color-mix(in srgb, var(--danger) 12%, transparent);
    color: var(--danger);
  }

  .board-sanction-record-meta {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
  }

  .board-post-content {
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 2px solid var(--border-strong);
  }

  .board-comments {
    margin-bottom: 8px;
    padding-bottom: 22px;
    border-bottom: 2px solid var(--border-strong);
  }

  .board-comments-header {
    display: flex;
    margin: 0 0 14px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .board-comments-header h2 {
    margin: 0;
    font-size: 18px;
  }

  .board-post-meta-actions {
    display: flex;
    margin-left: auto;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px 10px;
    white-space: nowrap;
  }

  .board-comment-header {
    display: flex;
    padding: 9px 12px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
  }

  .board-comment-author {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
  }

  .board-comment-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 10px;
  }

  .board-action-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
  }

  .board-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
  }

  .board-action svg {
    width: 15px;
    height: 15px;
  }

  .board-action:hover {
    color: var(--accent);
  }

  .board-action-edit:hover {
    color: var(--text);
  }

  .board-action-delete {
    color: #d96a6a;
  }

  .board-action-delete:hover {
    color: #f08a8a;
  }

  .board-reply-list {
    margin: 0;
    padding: 0 0 0 18px;
    list-style: none;
    border-left: 2px solid var(--border-strong);
  }

  .board-comment-reply {
    margin-top: 10px;
  }

  .board-reply-panel,
  .board-edit-panel {
    margin: 12px 12px 14px;
    padding: 12px;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: var(--surface);
  }

  .board-reply-panel h3,
  .board-edit-panel h3 {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
  }

  .board-reply-form {
    display: grid;
    gap: 8px;
  }

  .board-reply-form > textarea {
    min-height: 84px;
    padding: 8px 10px;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: var(--input);
    color: var(--text);
    resize: vertical;
    font: inherit;
    font-size: 14px;
  }

  .board-reply-form .form-actions {
    justify-content: flex-end;
  }

  .board-comment-form {
    display: grid;
    width: 100%;
    max-width: none;
    margin-top: 14px;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .board-comment-form .form-error {
    grid-column: 1 / -1;
  }

  .board-comment-form > label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .board-comment-form > textarea {
    min-height: 56px;
    max-height: 160px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: var(--input);
    color: var(--text);
    resize: vertical;
    font: inherit;
    font-size: 14px;
    line-height: 1.45;
  }

  .board-comment-form > .form-actions {
    margin: 0;
    justify-content: flex-end;
  }

  .board-comment-form > .form-actions .primary-action {
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    background: var(--accent);
    color: var(--accent-contrast);
    font: inherit;
    cursor: pointer;
  }

  .board-write-form {
    display: grid;
    max-width: none;
    gap: 12px;
  }

  .board-write-form > input[type="text"] {
    max-width: 100%;
  }

  .board-write-tags {
    display: flex;
    min-width: 0;
    padding: 2px 0;
    align-items: center;
    gap: 18px;
  }

  .board-write-tags-label {
    flex: 0 0 auto;
    font-weight: 600;
  }

  .board-write-tag-options {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 16px;
  }

  .edit-form .board-write-tag-option {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-weight: 400;
    cursor: pointer;
  }

  .board-write-tag-option input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--accent);
  }

  .board-write-tag-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }

  .board-write-tag-option input[type="radio"]:checked + .board-write-tag-label {
    color: var(--accent);
    font-weight: 700;
  }

  .edit-form .board-write-tag-option.is-disabled {
    color: var(--muted);
    cursor: not-allowed;
    opacity: 0.48;
  }

  .board-write-form .content-editor-workspace {
    height: clamp(440px, 56vh, 660px);
  }

  .board-rich-editor {
    position: relative;
    margin-top: 2px;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: var(--surface-raised);
  }

  .board-rich-editor:not(.is-enhanced) .board-rich-visual {
    display: none;
  }

  .board-rich-editor.is-enhanced .board-rich-source {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  .board-rich-toolbar,
  .board-rich-statusbar {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-strong);
    background: var(--surface-raised);
  }

  .board-rich-toolbar button {
    display: inline-flex;
    width: 36px;
    height: 34px;
    padding: 0;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-right: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font: inherit;
    cursor: pointer;
  }

  .board-rich-toolbar button:hover {
    background: var(--accent-soft);
    color: var(--accent);
  }

  .board-rich-toolbar svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: currentColor;
  }

  .board-rich-fullscreen {
    margin-left: auto;
    border-left: 1px solid var(--border);
  }

  .board-rich-toolbar {
    min-height: 41px;
    padding: 3px 6px;
    overflow-x: auto;
  }

  .board-rich-separator {
    width: 1px;
    height: 22px;
    margin: 0 6px;
    background: var(--border-strong);
    flex: 0 0 1px;
  }

  .board-rich-content {
    min-height: 460px;
    max-height: min(62vh, 760px);
    padding: 18px 20px;
    overflow: auto;
    outline: 0;
    background: var(--input);
    color: var(--text);
    caret-color: var(--text);
    line-height: 1.65;
  }

  .board-comment-form .board-rich-content,
  .board-reply-form .board-rich-content {
    min-height: 132px;
    max-height: min(38vh, 360px);
    padding: 12px 14px;
    line-height: 1.55;
  }

  .board-rich-content:empty::before {
    color: var(--muted-2);
    content: attr(data-placeholder);
    pointer-events: none;
  }

  .board-rich-content > :first-child {
    margin-top: 0;
  }

  .board-rich-content > :last-child {
    margin-bottom: 0;
  }

  .board-template-guidance-target {
    min-height: 1.65em;
    cursor: text;
  }

  .board-template-guidance-preview {
    color: var(--muted-2);
    font-size: 14px;
  }

  .content-code-editor {
    position: relative;
    min-width: 0;
    min-height: 0;
    height: 100%;
  }

  .content-code-editor.is-enhanced {
    border: 1px solid var(--border-strong);
    border-radius: 0 0 3px 3px;
    background: var(--input);
  }

  .content-code-editor.is-enhanced > .editor-monaco {
    visibility: visible;
    pointer-events: auto;
  }

  .content-code-editor.is-enhanced > textarea[data-content-editor-input] {
    display: none;
  }

  .board-template-guidance-target[data-board-template-guidance-node]:not([data-board-template-guidance-hidden])::before {
    color: var(--muted-2);
    content: attr(data-board-template-guidance-message);
    font-size: 14px;
    pointer-events: none;
    user-select: none;
  }

  .board-rich-content table {
    max-width: 100%;
    border-collapse: collapse;
  }

  .board-rich-content td,
  .board-rich-content th {
    padding: 6px 9px;
    border: 1px solid var(--border-strong);
  }

  .board-rich-content .diff-table td {
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--border-strong);
    vertical-align: top;
  }

  .board-rich-content .diff-table tbody tr:last-child td {
    border-bottom: 0;
  }

  .board-rich-content .diff-table td.diff-line-number {
    border-right: 1px solid var(--border-strong);
    vertical-align: middle;
  }

  .board-rich-statusbar {
    min-height: 30px;
    padding: 0 12px;
    justify-content: flex-end;
    border-top: 1px solid var(--border-strong);
    border-bottom: 0;
    color: var(--muted);
    font-size: 12px;
  }

  .board-rich-error {
    margin: 0;
  }

  .content-rich-source-pane {
    grid-template-rows: minmax(0, 1fr) auto !important;
  }

  .content-rich-editor {
    height: 100%;
    margin: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .content-rich-editor.is-enhanced .content-rich-visual {
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .content-rich-editor .content-rich-content {
    height: 100%;
    min-height: 0;
    max-height: none;
    padding: 12px;
    overflow: auto;
    border: 1px solid var(--border-strong);
    border-top: 0;
    border-radius: 0 0 3px 3px;
    line-height: 1.55;
  }

  .board-rich-editor.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    border: 0;
    border-radius: 0;
    flex-direction: column;
    background: var(--bg);
  }

  .board-rich-editor.is-fullscreen .board-rich-visual {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
  }

  .board-rich-editor.is-fullscreen .board-rich-content {
    min-height: 0;
    max-height: none;
    flex: 1;
  }

  @media (max-width: 640px) {
    .board-write-tags {
      align-items: flex-start;
      flex-direction: column;
      gap: 4px;
    }

    .board-write-form .content-editor-workspace {
      height: min(58vh, 520px);
      min-height: 360px;
    }

    .board-rich-content {
      min-height: 380px;
      padding: 14px;
    }

    .board-comment-form .board-rich-content,
    .board-reply-form .board-rich-content {
      min-height: 120px;
      padding: 10px 12px;
    }

    .board-rich-toolbar button {
      width: 34px;
      flex-basis: 34px;
    }
  }

  .board-post-list {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 0;
  }

  .board-post-list-heading {
    display: flex;
    margin-bottom: 8px;
    justify-content: flex-end;
  }

  .board-deleted-message {
    margin: 0;
    color: var(--muted);
  }


  @media (max-width: 820px) {
    .board-home {
      grid-template-columns: 1fr;
    }

    .board-post-meta {
      align-items: center;
      flex-wrap: wrap;
    }

  }
}

.admin-job-summary {
  display: grid;
  gap: 0;
  margin: 0 0 1rem;
  border-top: 1px solid var(--border);
}

.admin-job-summary > div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--border);
}

.admin-job-summary dt {
  font-weight: 700;
}

.admin-job-summary dd {
  margin: 0;
}

.admin-job-note {
  margin: -.3rem 0 1rem;
}

.admin-batch-actions,
.admin-batch-actions form {
  display: flex;
  gap: .5rem;
}

@layer pages {
  .document-license-field {
    display: grid;
    min-width: 0;
    gap: 8px;
  }
  .wiki-editor > .document-license-field { padding-inline: 1px; }
  .document-license-selection-dialog .permission-dialog-actions { flex-wrap: wrap; }
  .document-license-selection-dialog .document-license-selection-confirm { display: grid; }
  .document-license-selection-confirm > span { grid-area: 1 / 1; }
  .document-license-selection-confirm:not(:disabled) .document-license-confirm-countdown,
  .document-license-selection-confirm:disabled .document-license-confirm-label { visibility: hidden; }
  .document-license-notice {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--accent);
    background: var(--surface-raised);
    color: var(--text);
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .document-license-notice p { margin: 4px 0 0; }
  .document-license-notice.has-badge {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .document-license-copy { flex: 1; min-width: 0; }
  .document-license-copy > p:first-child { margin-top: 0; }
  .document-license-notice .document-license-exclusions,
  .document-license-change-note { color: var(--muted); font-size: 13px; }
  .document-license-revert-warning { margin: 0 0 14px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--surface-raised); }
}
