/*
 * THE WIKI'S LOOK -- freeappstack.com/wiki, the app's own pages and every wiki's. Built to look and work like BookStack: a
 * coloured header bar, white cards on a light grey page, three columns (details / the content / actions), each kind of thing in
 * its own colour (shelves red, books green, chapters orange, pages blue -- from each wiki's Settings, as CSS variables set in the
 * page's head). Text is Arial, 13px at the least; every text field is white with dark text; colours meet WCAG 2.2 AA (4.5:1 for
 * text) in light and dark mode. The standard Free App Stack footer sits under every page (.wFoot).
 */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.5; color: #222222; background: #f2f2f2; }
a { color: var(--wLink, #206ea7); }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: Arial, Helvetica, sans-serif; font-size: 14px; }
h1, h2, h3, h4 { font-weight: normal; line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
:focus-visible { outline: 2px solid var(--wPrimary, #206ea7); outline-offset: 2px; }
[hidden] { display: none !important; }
.wSkip { position: absolute; left: -9999px; top: 8px; }
.wSkip:focus { left: 8px; z-index: 1000; background: #ffffff; color: #222222; padding: 8px 12px; border-radius: 4px; }
.wIcon { width: 18px; height: 18px; fill: currentColor; vertical-align: -4px; flex: none; }
.wTiny { width: 12px; height: 12px; vertical-align: -1px; }
.wQuiet { color: #595959; }
.wEmpty { margin: 8px 0; }
.wDangerText { color: #b3261e !important; }

.wC-shelf, .wTi-shelf, .wItem-shelf .wItemName, .wItem-shelf .wItemIcon { color: var(--wShelf, #a94747); }
.wC-book, .wTi-book, .wItem-book .wItemName, .wItem-book .wItemIcon { color: var(--wBook, #077b70); }
.wC-chapter, .wTi-chapter, .wItem-chapter .wItemName, .wItem-chapter .wItemIcon { color: var(--wChapter, #af4d0d); }
.wC-page, .wTi-page, .wItem-page .wItemName, .wItem-page .wItemIcon { color: var(--wPage, #206ea7); }
.wIsDraft, .wIsDraft .wItemName, .wIsDraft .wItemIcon { color: var(--wDraft, #7e50b1) !important; }
.wDraftTag { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; background: var(--wDraft, #7e50b1); color: #ffffff; border-radius: 3px; padding: 1px 5px; vertical-align: 1px; }

.wHeader { background: var(--wPrimary, #206ea7); color: #ffffff; position: relative; z-index: 20; }
.wHeaderIn { display: flex; align-items: center; gap: 16px; padding: 8px 24px; min-height: 60px; flex-wrap: wrap; }
.wLogo { display: flex; align-items: center; gap: 10px; color: #ffffff; text-decoration: none; font-size: 22px; white-space: nowrap; }
.wLogo:hover { text-decoration: none; }
.wLogo img { height: 43px; max-width: 220px; object-fit: contain; }
.wSearchBox { flex: 1 1 260px; max-width: 520px; display: flex; margin: 0 auto; }
.wSearchBox input { flex: 1; min-width: 0; height: 34px; border: 1px solid #8c8c8c; border-right: 0; border-radius: 4px 0 0 4px; padding: 4px 12px; background: #ffffff; color: #222222; }
.wSearchBox button { height: 34px; width: 40px; border: 1px solid #8c8c8c; border-radius: 0 4px 4px 0; background: #ffffff; color: #444444; cursor: pointer; }
.wNav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.wNav > a, .wUserMenu > summary { color: #ffffff; text-decoration: none; padding: 8px 10px; border-radius: 4px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.wNav > a:hover, .wUserMenu > summary:hover { background: rgba(255, 255, 255, .16); text-decoration: none; }
.wUserMenu { position: relative; }
.wUserMenu > summary { list-style: none; }
.wUserMenu > summary::-webkit-details-marker { display: none; }
.wUserName { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wMenu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: #ffffff; color: #222222; border-radius: 4px; box-shadow: 0 4px 16px rgba(0, 0, 0, .2); padding: 6px 0; z-index: 50; }
.wMenu a, .wMenu .wLinkBtn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 16px; color: #222222; text-decoration: none; text-align: left; }
.wMenu a:hover, .wMenu .wLinkBtn:hover { background: #f0f4f8; text-decoration: none; }
.wMenu form { margin: 0; }

.wAvatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.wAvatarLetter { background: #dde6ee; color: #1f3b55; font-size: 14px; }
.wAvatarSm { width: 26px; height: 26px; font-size: 12px; }
.wAvatarLg { width: 96px; height: 96px; font-size: 36px; }
.wHeader .wAvatarLetter { background: rgba(255, 255, 255, .9); }

.wMain { outline: none; }
.wMain > .wNote { max-width: 940px; margin: 16px auto 0; }
.wTri { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 940px) minmax(0, 1fr); gap: 24px; padding: 20px 24px 48px; align-items: start; }
.wLeft { grid-column: 1; justify-self: end; width: 100%; max-width: 320px; }
.wMid { grid-column: 2; min-width: 0; }
.wRight { grid-column: 3; width: 100%; max-width: 300px; }
.wOne { padding: 20px 24px 48px; margin: 0 auto; }
.wOne-narrow { max-width: 900px; }
.wOne-wide { max-width: 1400px; }
.wOne-edit { max-width: none; padding: 0; }
@media (max-width: 1400px) {
  .wTri { grid-template-columns: 280px minmax(0, 1fr); }
  .wRight { grid-column: 1; grid-row: 1; max-width: none; }
  .wLeft { grid-column: 1; grid-row: 2; max-width: none; justify-self: stretch; }
  .wMid { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 900px) {
  .wTri { grid-template-columns: minmax(0, 1fr); padding: 12px 12px 40px; }
  .wMid { grid-column: 1; grid-row: 1; }
  .wRight { grid-row: 2; }
  .wLeft { grid-row: 3; }
  .wHeaderIn { padding: 8px 12px; }
  .wUserName, .wNav > a span { display: none; }
  .wOne { padding: 12px 12px 40px; }
}
.wCard { background: #ffffff; border-radius: 4px; box-shadow: 0 1px 6px -1px rgba(0, 0, 0, .12); margin-bottom: 20px; }
.wPad { padding: 20px 28px; }
@media (max-width: 600px) { .wPad { padding: 16px; } }
.wCardTitle { font-size: 18px; padding: 16px 20px 0; margin: 0 0 8px; }
.wTitleRow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.wTitleRow h1 { margin: 0; }
.wDesc { color: #444444; margin: -4px 0 16px; }
.wCrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 12px; font-size: 14px; }
.wCrumbs a { text-decoration: none; display: inline-flex; align-items: center; gap: 5px; padding: 2px 4px; border-radius: 3px; }
.wCrumbs a:hover { background: rgba(0, 0, 0, .05); }
.wSep { color: #767676; display: inline-flex; }
.wMore { display: block; padding: 10px 20px 14px; }
.wPager { display: flex; gap: 16px; align-items: center; justify-content: center; margin-top: 16px; }

.wSide { margin-bottom: 24px; }
.wSide > h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #595959; margin: 0 0 8px; font-weight: bold; }
.wAction { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; background: none; color: #333333; text-decoration: none; border-radius: 4px; cursor: pointer; text-align: left; font-size: 14px; }
.wAction:hover { background: rgba(0, 0, 0, .06); text-decoration: none; color: var(--wPrimary, #206ea7); }
.wActForm { margin: 0; }
.wExport > summary { list-style: none; }
.wExport > summary::-webkit-details-marker { display: none; }
.wExportList { padding: 2px 0 6px 36px; display: flex; flex-direction: column; gap: 4px; }
.wDetails > div { display: flex; gap: 8px; align-items: flex-start; color: #444444; margin-bottom: 6px; }
.wDetails .wIcon { margin-top: 2px; color: #767676; }
.wRestricted { color: #8a4b00 !important; }
.wRestricted .wIcon { color: #8a4b00 !important; }
.wBookNav { font-size: 14px; }
.wBookNav ul { list-style: none; margin: 0; padding: 0; }
.wBookNav ul ul { padding-left: 14px; border-left: 2px solid rgba(175, 77, 13, .35); margin-left: 8px; }
.wBookNav a { display: flex; gap: 6px; align-items: flex-start; padding: 4px 6px; border-radius: 3px; text-decoration: none; }
.wBookNav a:hover { background: rgba(0, 0, 0, .05); }
.wBookNav a.wCurrent { background: rgba(32, 110, 167, .1); font-weight: bold; }
.wBookNavTitle { font-size: 15px; margin-bottom: 6px; }
.wBookNav details > summary { font-size: 13px; color: #595959; cursor: pointer; padding: 2px 6px 2px 30px; }
.wPageNav ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid #dddddd; }
.wPageNav a { display: block; padding: 3px 8px; text-decoration: none; color: #333333; }
.wPageNav a:hover { color: var(--wPrimary, #206ea7); background: rgba(0, 0, 0, .04); }
.wNavL2 a { padding-left: 20px !important; } .wNavL3 a { padding-left: 32px !important; } .wNavL4 a, .wNavL5 a, .wNavL6 a { padding-left: 44px !important; }
.wAttList { list-style: none; margin: 0; padding: 0; }
.wAttList li { padding: 4px 0; }
.wAttList a { display: inline-flex; gap: 6px; align-items: flex-start; }
.wActivity .wActRow { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #ececec; }
.wActivity .wActRow:last-child { border-bottom: 0; }
.wHomeCard .wActivity { padding: 0 20px 12px; }
.wHomeCard > .wEmpty { padding: 0 20px 14px; margin: 0; }

.wItems { display: flex; flex-direction: column; }
.wItem { display: flex; gap: 12px; padding: 10px 12px; text-decoration: none; color: #222222; border-radius: 4px; border-bottom: 1px solid #ececec; }
.wItem:hover { background: #f5f8fb; text-decoration: none; }
.wItemIcon .wIcon { width: 22px; height: 22px; margin-top: 1px; }
.wItemBody { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.wItemName { font-size: 16px; }
.wItemMeta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.wItemMeta .wIcon { width: 14px; height: 14px; vertical-align: -2px; margin-right: 2px; }
.wItemSnip { color: #4d4d4d; font-size: 13px; overflow-wrap: anywhere; }
.wItemSnip strong { background: #fff3b0; color: #222222; font-weight: normal; }
.wHomeCard .wItems { padding: 0 8px 4px; }
.wHomeCard .wItem { padding: 8px 12px; }
.wHomeGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 0 24px 40px; max-width: 1400px; margin: 0 auto; }
@media (max-width: 1100px) { .wHomeGrid { grid-template-columns: minmax(0, 1fr); padding: 0 12px 40px; } }
.wHideSnips .wItemSnip { display: none; }
.wHomeTop { display: flex; gap: 20px; justify-content: flex-end; max-width: 1400px; margin: 0 auto; padding: 12px 24px; }
.wShelfBooks, .wChapterPages { margin: -4px 0 6px 46px; }
.wShelfBooks > summary, .wChapterPages > summary { cursor: pointer; color: #595959; font-size: 13px; padding: 2px 0; }
.wChapterPages .wItem { padding: 6px 10px; border-bottom: 0; }
.wChapterPages .wItemName { font-size: 14px; }
.wGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.wGridCard { display: flex; flex-direction: column; background: #ffffff; border-radius: 4px; box-shadow: 0 1px 6px -1px rgba(0, 0, 0, .15); text-decoration: none; color: #222222; overflow: hidden; }
.wGridCard:hover { box-shadow: 0 2px 12px rgba(0, 0, 0, .2); text-decoration: none; }
.wGridCover { height: 130px; display: flex; align-items: center; justify-content: center; background: var(--wBook, #077b70); }
.wGridCard-shelf .wGridCover { background: var(--wShelf, #a94747); }
.wGridCover img { width: 100%; height: 100%; object-fit: cover; }
.wGridCover .wIcon { width: 48px; height: 48px; fill: rgba(255, 255, 255, .85); color: #ffffff; }
.wGridBody { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.wGridFoot { padding: 8px 14px; border-top: 1px solid #ececec; font-size: 13px; }
.wSortBar { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.wSortBar select { height: 30px; }

.wTags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.wTag { display: inline-flex; border: 1px solid #c9c9c9; border-radius: 4px; overflow: hidden; font-size: 13px; text-decoration: none; color: #333333; }
.wTagName { padding: 1px 8px; display: inline-flex; gap: 4px; align-items: center; }
.wTagName .wIcon { width: 13px; height: 13px; }
.wTagVal { padding: 1px 8px; border-left: 1px solid #c9c9c9; background: #f2f2f2; }
a.wTag:hover { border-color: var(--wPrimary, #206ea7); text-decoration: none; }
.wPill { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; border-radius: 3px; padding: 1px 6px; background: #e6eef5; color: #1f3b55; vertical-align: 1px; }
.wNote { border-radius: 4px; padding: 10px 14px; margin: 0 0 14px; border-left: 4px solid; }
.wNote-ok { background: #e9f5ea; border-color: #2e7d32; color: #1b4d1e; }
.wNote-error { background: #fbeaea; border-color: #b3261e; color: #7a1712; }
.wNote-warn { background: #fdf3e2; border-color: #b45f06; color: #5e3200; }

.wForm { max-width: 760px; }
.wField { margin: 0 0 16px; border: 0; padding: 0; }
.wField > label, .wField > legend, .wLabel { display: block; font-size: 13px; color: #333333; font-weight: normal; margin-bottom: 4px; }
fieldset.wField { min-width: 0; }
.wHelp { font-size: 13px; color: #595959; margin: 4px 0 0; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=url], input[type=number], input[type=date], input:not([type]), textarea, select {
  background: #ffffff; color: #222222; border: 1px solid #8c8c8c; border-radius: 3px; padding: 4px 8px; min-height: 30px; max-width: 100%; font-family: Arial, Helvetica, sans-serif; }
.wField input[type=text], .wField input[type=email], .wField input[type=password], .wField input[type=url], .wField textarea, .wField select { width: 100%; }
textarea { min-height: 80px; resize: vertical; line-height: 1.4; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--wPrimary, #206ea7); outline-offset: 0; background: #ffffff; }
input:-webkit-autofill, input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 1000px #ffffff inset; -webkit-text-fill-color: #222222; }
input[disabled], select[disabled], textarea[disabled] { background: #eeeeee; color: #666666; }
input[type=color] { width: 48px; height: 32px; padding: 2px; border: 1px solid #8c8c8c; border-radius: 3px; background: #ffffff; }
.wCheck { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: #222222; margin: 4px 0; cursor: pointer; }
.wCheck input { margin-top: 3px; }
.btnPrimary, .btnSecondary, .btnDanger, .btnGo { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 6px 16px; border-radius: 4px; border: 1px solid transparent;
  font-size: 14px; font-family: Arial, Helvetica, sans-serif; cursor: pointer; text-decoration: none; line-height: 1.2; white-space: nowrap; }
.btnPrimary, .btnGo { background: var(--wPrimary, #206ea7); color: #ffffff; }
.btnPrimary:hover, .btnGo:hover { filter: brightness(.9); text-decoration: none; }
.btnSecondary { background: #ffffff; color: #1d5f8f; border-color: #8c8c8c; }
.btnSecondary:hover { background: #f0f4f8; text-decoration: none; }
.btnDanger { background: #b3261e; color: #ffffff; }
.btnDanger:hover { background: #8f1e18; text-decoration: none; }
.wSmallBtn { min-height: 28px; padding: 3px 10px; font-size: 13px; }
.wBtnRow { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; clear: both; }
.wBtnRowLeft { justify-content: flex-start; }
.wBtnRow form, .wInline { display: inline; margin: 0; }
.wIconBtn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid transparent; border-radius: 4px; background: none; color: #444444; cursor: pointer; text-decoration: none; }
.wIconBtn:hover { background: rgba(0, 0, 0, .07); }
.wLinkBtn { background: none; border: 0; padding: 0; color: var(--wLink, #206ea7); cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.wLinkBtn:hover { text-decoration: underline; }
.wHomeTop .wLinkBtn { color: #444444; }
.wTagRows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.wTagRow { display: flex; gap: 6px; align-items: center; }
.wTagRow input { flex: 1; min-width: 0; }
.wPickList, .wTargets { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow: auto; border: 1px solid #d6d6d6; border-radius: 4px; }
.wPickList li, .wTargets li { display: flex; justify-content: space-between; align-items: center; padding: 4px 10px; border-bottom: 1px solid #eeeeee; }
.wTargets label { display: flex; gap: 8px; align-items: center; cursor: pointer; padding: 3px 0; width: 100%; }
.wIndent { padding-left: 24px !important; }
.wOrderBtns { display: inline-flex; }
.wOrderBtns .wIconBtn { width: 26px; height: 26px; }
.wPickFilter { margin-bottom: 8px; }
.wPickFilter input { width: 100%; }
.wCoverPrev, .wLogoPrev { display: block; max-width: 240px; max-height: 120px; margin: 4px 0 6px; border-radius: 4px; }
.wColorGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px; }
.wColorField { display: flex; align-items: center; gap: 10px; flex-direction: row-reverse; justify-content: flex-end; margin: 0; }
.wColorField label { margin: 0 !important; }
.wInSearch { display: flex; gap: 4px; margin: 0 0 14px; max-width: 420px; }
.wInSearch input { flex: 1; }
.wBigSearch { display: flex; gap: 8px; margin-bottom: 8px; }
.wBigSearch input { flex: 1; min-height: 36px; font-size: 16px; }
.wResultsTitle { margin-top: 20px; font-size: 20px; }
.wFilters fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.wFilters legend { font-size: 13px; color: #333333; margin-bottom: 4px; font-weight: bold; }
.wFilters .wField { margin-bottom: 8px; }
.wFilters input[type=date] { width: 100%; }
.wFilterRow { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.wFilterRow .wField { margin: 0; }
.wOr { text-align: center; color: #595959; margin: 18px 0 10px; font-size: 13px; }
.wAlt { display: flex; flex-direction: column; gap: 8px; }
.wCodeIn { font-size: 22px !important; letter-spacing: 6px; text-align: center; max-width: 220px; }
.wDoor { max-width: 460px; margin: 40px auto; }
.wDoorBrand { display: flex; align-items: center; gap: 12px; justify-content: center; font-size: 22px; margin-bottom: 16px; color: #333333; }
.wDoorBrand img { height: 48px; }
.wDoorFoot { text-align: center; font-size: 13px; }
.wIsDoor .wHeader .wSearchBox { display: none; }

.wTableWrap { overflow-x: auto; }
.wTable { width: 100%; border-collapse: collapse; font-size: 14px; }
.wTable th, .wTable td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e4e4e4; vertical-align: top; }
.wTable thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #4d4d4d; border-bottom: 2px solid #d6d6d6; white-space: nowrap; }
.wSortable thead th:not([data-nosort]) { cursor: pointer; user-select: none; }
.wSortable thead th:not([data-nosort]):hover { color: var(--wPrimary, #206ea7); }
.wSortable thead th[aria-sort=ascending]::after { content: ' \25B2'; font-size: 10px; }
.wSortable thead th[aria-sort=descending]::after { content: ' \25BC'; font-size: 10px; }
.wRowActs { white-space: nowrap; }
.wRowActs a, .wRowActs form { margin-right: 10px; }
.wRowActs form { display: inline; }
.wPermTable td, .wPermTable th { vertical-align: middle; }
.wMatrix select { min-width: 80px; }
.wTabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 16px; border-bottom: 1px solid #d6d6d6; }
.wTabs a { padding: 8px 14px; text-decoration: none; color: #333333; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.wTabs a.wTabOn { border-color: var(--wPrimary, #206ea7); color: var(--wPrimary, #206ea7); }

.wPage { overflow: hidden; }
.wPageBody { padding: 28px 48px 48px; }
@media (max-width: 700px) { .wPageBody { padding: 16px; } }
.wPageTitle { font-size: 32px; margin-bottom: 20px; }
.wContent { font-size: 15px; line-height: 1.6; overflow-wrap: break-word; }
.wContent h1 { font-size: 28px; margin: 1.1em 0 .5em; }
.wContent h2 { font-size: 24px; margin: 1.1em 0 .5em; }
.wContent h3 { font-size: 20px; margin: 1em 0 .5em; }
.wContent h4 { font-size: 17px; margin: 1em 0 .5em; }
.wContent h5, .wContent h6 { font-size: 15px; font-weight: bold; margin: 1em 0 .5em; }
.wContent p, .wContent ul, .wContent ol, .wContent blockquote, .wContent pre, .wContent table { margin: 0 0 1em; }
.wContent img { max-width: 100%; height: auto; }
.wContent video { max-width: 100%; }
.wContent iframe { max-width: 100%; }
.wContent blockquote { border-left: 4px solid var(--wPrimary, #206ea7); margin-left: 0; padding: 4px 16px; color: #444444; background: #f7f9fb; }
.wContent pre { background: #f5f5f5; border: 1px solid #dddddd; border-radius: 4px; padding: 12px; overflow: auto; font-size: 13px; line-height: 1.45; }
.wContent code { font-family: Consolas, 'Courier New', monospace; font-size: 13px; background: #f2f2f2; border: 1px solid #e0e0e0; border-radius: 3px; padding: 0 4px; }
.wContent pre code { background: none; border: 0; padding: 0; }
.wContent table { border-collapse: collapse; max-width: 100%; display: block; overflow-x: auto; }
.wContent td, .wContent th { border: 1px solid #cfcfcf; padding: 5px 9px; vertical-align: top; }
.wContent th { background: #f5f5f5; }
.wContent hr { border: 0; border-top: 1px solid #dddddd; margin: 1.5em 0; }
.wContent .callout { border-left: 4px solid #3f7bbd; background: #edf4fb; padding: 10px 16px; margin: 0 0 1em; border-radius: 0 4px 4px 0; }
.wContent .callout.success { border-color: #2e7d32; background: #edf7ee; }
.wContent .callout.warning { border-color: #b45f06; background: #fdf4e7; }
.wContent .callout.danger { border-color: #b3261e; background: #fcecec; }
.wContent .align-center, .wContent [style*='text-align: center'] { text-align: center; }
.wContent .align-right { text-align: right; }
.wContent img.align-center { display: block; margin-left: auto; margin-right: auto; }
.wContent img.align-right { float: right; margin-left: 12px; }
.wContent img.align-left { float: left; margin-right: 12px; }
.wContent :target { background: #fff6cc; }
.wDiff ins { background: #d7f5d9; color: #0d4211; text-decoration: none; }
.wDiff del { background: #fbdada; color: #6d1410; }
.wPrevNext { display: flex; justify-content: space-between; gap: 16px; margin: -4px 0 20px; }
.wPrevNext a { display: flex; flex-direction: column; text-decoration: none; background: #ffffff; padding: 10px 16px; border-radius: 4px; box-shadow: 0 1px 6px -1px rgba(0, 0, 0, .12); max-width: 48%; }
.wPrevNext .wNext { text-align: right; margin-left: auto; }
.wComments .wComment { border-top: 1px solid #ececec; padding: 12px 0; }
.wCommentHead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.wCommentActs { margin-left: auto; display: flex; gap: 12px; }
.wCommentBody { margin: 6px 0 0 34px; font-size: 14px; }
.wReply { margin-left: 34px; }
.wCommentForm { margin-top: 12px; }
.wCommentForm label { display: block; font-size: 13px; color: #333333; margin-bottom: 4px; }
.wCommentForm textarea { width: 100%; }
.wProfileHead { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.wProfileHead h1 { margin: 0; }
.wProfileCounts { margin-left: auto; display: flex; gap: 16px; flex-wrap: wrap; }
.wProfileCounts span { display: inline-flex; gap: 6px; align-items: center; }
.wAvatarForm { display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; }
.wAvatarForm .wField { margin: 0; }
.wPkList { list-style: none; margin: 0 0 12px; padding: 0; }
.wPkList li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #ececec; }
.wPkList li .wLinkBtn { margin-left: auto; }

.wIsEditor { background: #f2f2f2; }
.wEditor { display: flex; flex-direction: column; min-height: calc(100vh - 60px); }
.wEditBar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: #ffffff; border-bottom: 1px solid #d6d6d6; flex-wrap: wrap; }
.wEditWhere { display: inline-flex; gap: 6px; align-items: center; color: #444444; }
.wDraftStatus { color: #595959; font-size: 13px; margin-left: auto; }
.wSummary { width: 280px; max-width: 100%; }
.wEditor > .wNote { margin: 12px 16px 0; }
.wEditGrid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; padding: 16px; flex: 1; }
@media (max-width: 1000px) { .wEditGrid { grid-template-columns: minmax(0, 1fr); } .wDraftStatus { margin-left: 0; } }
.wEditMain { display: flex; flex-direction: column; gap: 10px; min-width: 0; max-width: 1000px; width: 100%; margin: 0 auto; }
.wPageNameIn { font-size: 24px !important; min-height: 46px !important; padding: 6px 12px !important; }
.wEditorArea { width: 100%; min-height: 600px; font-family: Consolas, monospace; font-size: 13px; }
.wEditSide details { background: #ffffff; border-radius: 4px; box-shadow: 0 1px 6px -1px rgba(0, 0, 0, .12); padding: 10px 14px; margin-bottom: 12px; }
.wEditSide summary { cursor: pointer; display: flex; gap: 8px; align-items: center; font-size: 15px; }
.wEditSide details[open] > summary { margin-bottom: 10px; }
.wEditSide .wTagRow input { width: 100%; }
.wAttEdit { list-style: none; margin: 0 0 10px; padding: 0; }
.wAttEdit li { display: flex; align-items: center; gap: 4px; padding: 3px 0; border-bottom: 1px solid #eeeeee; }
.wAttEdit li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wAttAdd { display: flex; flex-direction: column; gap: 8px; }
.wAttLink input { width: 100%; margin: 4px 0; }
.wFileBtn { cursor: pointer; align-self: flex-start; }
.tox-tinymce { border-radius: 4px !important; }
/* The picture gallery (opened from the editor) */
.wModal { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.wModalBox { background: #ffffff; color: #222222; border-radius: 6px; width: min(960px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 10px 40px rgba(0, 0, 0, .3); }
.wModalHead { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #e0e0e0; }
.wModalHead h2 { font-size: 18px; margin: 0; flex: 1; }
.wModalBody { padding: 12px 16px; overflow: auto; }
.wGalleryBar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.wGallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.wGallery button { border: 2px solid transparent; background: #f5f5f5; border-radius: 4px; padding: 4px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: stretch; text-align: left; }
.wGallery button:hover, .wGallery button:focus-visible { border-color: var(--wPrimary, #206ea7); }
.wGallery img { width: 100%; height: 100px; object-fit: contain; background: #ffffff; }
.wGallery span { font-size: 12px; color: #444444; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wSortBox { border: 1px solid #d6d6d6; border-radius: 4px; padding: 10px; }
.wSortBook { display: flex; gap: 8px; align-items: center; font-size: 16px; margin-bottom: 8px; color: var(--wBook, #077b70); }
.wSortList { list-style: none; margin: 0; padding: 0; min-height: 10px; }
.wSortChapter { margin: 4px 0 4px 28px; padding: 4px 0 8px; border-left: 2px solid rgba(175, 77, 13, .35); padding-left: 8px; min-height: 28px; }
.wSortItem { margin: 3px 0; }
.wSortItem > .wSortHandle { display: inline-flex; gap: 8px; align-items: center; padding: 6px 10px; background: #f7f7f7; border: 1px solid #e0e0e0; border-radius: 4px; cursor: grab; min-width: 60%; }
.wSort-chapter > .wSortHandle { color: var(--wChapter, #af4d0d); }
.wSort-page > .wSortHandle { color: var(--wPage, #206ea7); }
.wSortItem.wDragging > .wSortHandle { opacity: .5; }
.wDropTarget { outline: 2px dashed var(--wPrimary, #206ea7); }

.wDebug { margin: 20px; background: #1e1e1e; color: #e0e0e0; border-radius: 4px; padding: 10px 14px; font: 12px/1.45 Consolas, monospace; }
.wDebug summary { cursor: pointer; color: #ffd27f; }
.wDebug ol { margin: 8px 0 0; padding-left: 28px; max-height: 420px; overflow: auto; }
.wDebug li { white-space: pre-wrap; word-break: break-all; }

html.dark-mode body { background: #111111; color: #e3e3e3; }
html.dark-mode a { color: #7fbbe8; }
html.dark-mode .wCard, html.dark-mode .wGridCard, html.dark-mode .wPrevNext a, html.dark-mode .wEditBar, html.dark-mode .wEditSide details, html.dark-mode .wMenu, html.dark-mode .wModalBox { background: #222222; color: #e3e3e3; }
html.dark-mode .wMenu a, html.dark-mode .wMenu .wLinkBtn { color: #e3e3e3; }
html.dark-mode .wMenu a:hover, html.dark-mode .wMenu .wLinkBtn:hover, html.dark-mode .wItem:hover { background: #2e3338; }
html.dark-mode .wQuiet, html.dark-mode .wHelp, html.dark-mode .wItemSnip, html.dark-mode .wSide > h2, html.dark-mode .wDesc, html.dark-mode .wDetails > div,
html.dark-mode .wTable thead th, html.dark-mode .wDraftStatus, html.dark-mode .wEditWhere, html.dark-mode .wBookNav details > summary { color: #b3b3b3; }
html.dark-mode .wItem, html.dark-mode .wAction, html.dark-mode .wPageNav a, html.dark-mode .wTabs a, html.dark-mode .wField > label, html.dark-mode .wField > legend, html.dark-mode .wLabel,
html.dark-mode .wCheck, html.dark-mode .wHomeTop .wLinkBtn, html.dark-mode .wFilters legend, html.dark-mode .wCommentForm label, html.dark-mode .wDoorBrand, html.dark-mode .wTag { color: #e3e3e3; }
html.dark-mode .wItem, html.dark-mode .wTable th, html.dark-mode .wTable td, html.dark-mode .wActivity .wActRow, html.dark-mode .wComments .wComment, html.dark-mode .wGridFoot { border-color: #3a3a3a; }
html.dark-mode .wC-shelf, html.dark-mode .wTi-shelf, html.dark-mode .wItem-shelf .wItemName, html.dark-mode .wItem-shelf .wItemIcon { color: #ff8a8a; }
html.dark-mode .wC-book, html.dark-mode .wTi-book, html.dark-mode .wItem-book .wItemName, html.dark-mode .wItem-book .wItemIcon, html.dark-mode .wSortBook { color: #5fd0b0; }
html.dark-mode .wC-chapter, html.dark-mode .wTi-chapter, html.dark-mode .wItem-chapter .wItemName, html.dark-mode .wItem-chapter .wItemIcon { color: #f3a36b; }
html.dark-mode .wC-page, html.dark-mode .wTi-page, html.dark-mode .wItem-page .wItemName, html.dark-mode .wItem-page .wItemIcon { color: #7fbbe8; }
html.dark-mode .wIsDraft, html.dark-mode .wIsDraft .wItemName, html.dark-mode .wIsDraft .wItemIcon { color: #c2a1ee !important; }
html.dark-mode .wContent pre, html.dark-mode .wContent th, html.dark-mode .wContent blockquote { background: #2b2b2b; color: #e3e3e3; border-color: #444444; }
html.dark-mode .wContent code { background: #2b2b2b; border-color: #444444; color: #e3e3e3; }
html.dark-mode .wContent td, html.dark-mode .wContent th { border-color: #4a4a4a; }
html.dark-mode .wContent .callout { background: #1d2a36; color: #e3e3e3; }
html.dark-mode .wContent .callout.success { background: #1d2e20; } html.dark-mode .wContent .callout.warning { background: #33281a; } html.dark-mode .wContent .callout.danger { background: #351d1d; }
html.dark-mode .wTagVal { background: #333333; border-color: #555555; } html.dark-mode .wTag { border-color: #555555; }
html.dark-mode .wPill { background: #2f3b47; color: #e3e3e3; }
html.dark-mode .btnSecondary { background: #2b2b2b; color: #e3e3e3; border-color: #8c8c8c; }
html.dark-mode .wIconBtn, html.dark-mode .wSep { color: #cccccc; }
html.dark-mode .wBookNav a.wCurrent { background: rgba(127, 187, 232, .16); }
html.dark-mode .wSortItem > .wSortHandle, html.dark-mode .wGallery button { background: #2b2b2b; border-color: #444444; }
html.dark-mode .wItemSnip strong { background: #5a4d00; color: #ffffff; }
html.dark-mode .wAvatarLetter { background: #3a4754; color: #ffffff; }
html.dark-mode .wNote-ok { background: #1d2e20; color: #cfe9d1; } html.dark-mode .wNote-error { background: #351d1d; color: #f6d0cd; } html.dark-mode .wNote-warn { background: #33281a; color: #f6dfbf; }
html.dark-mode .wDiff ins { background: #1f4a23; color: #e3ffe5; } html.dark-mode .wDiff del { background: #5a1f1c; color: #ffe2df; }

.wLogoIcon { font-size: 26px; line-height: 1; }
.wHero { max-width: 1100px; margin: 8px auto 20px; padding: 28px 24px 8px; }
.wHero h1 { font-size: 32px; font-weight: bold; margin-bottom: .4em; }
.wLead { font-size: 18px; max-width: 760px; color: #333333; }
.wBig { font-size: 17px; padding: 11px 22px !important; }
.wOne-wide > .wCard, .wOne-wide > section { max-width: 1100px; margin-left: auto; margin-right: auto; }
.wFeatures { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px 28px; }
.wFeature { display: flex; gap: 14px; align-items: flex-start; }
.wFeature h3 { font-size: 16px; font-weight: bold; margin: 2px 0 4px; }
.wFeature p { margin: 0; color: #444444; }
.wFeatureIcon { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #e6eff7; color: #1d5f8f; display: inline-flex; align-items: center; justify-content: center; }
.wFeatureIcon .wIcon { width: 22px; height: 22px; vertical-align: 0; }
.wSplit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; max-width: 1100px; margin: 0 auto; align-items: start; }
@media (max-width: 800px) { .wSplit { grid-template-columns: minmax(0, 1fr); } .wHero h1 { font-size: 26px; } }
.wWide { width: 100%; justify-content: center; }
.wHp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wWikiCard .wGridBody { padding-top: 16px; }
.wWikiCard .wItemName { color: #1d5f8f; font-size: 17px; }
.wPlainList { list-style: none; padding: 0; margin: 0 0 12px; }
.wPlainList li { padding: 8px 0; border-bottom: 1px solid #e6e6e6; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.wPlainList li form { margin-left: auto; }
.wSlugRow { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.wSlugRow input { flex: 1 1 200px; min-width: 0; }
.wPlanForm { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.wPlanForm input[type=text] { width: 140px; }
.wAv1 { background: #e3eedd !important; color: #2c4a1f !important; } .wAv2 { background: #f3e5d8 !important; color: #5c3410 !important; }
.wAv3 { background: #ece0f3 !important; color: #46265a !important; } .wAv4 { background: #f6dede !important; color: #6b1f1f !important; }
.wAv5 { background: #dff0ef !important; color: #154743 !important; }
.wFoot { color: #444444; }
.wFoot .fas-foot { max-width: 1100px; margin: 8px auto 0; padding: 0 24px 32px; }
.wLayout-edit .wFoot .fas-foot { max-width: none; }
html.dark-mode .wLead, html.dark-mode .wFeature p, html.dark-mode .wFoot { color: #d0d0d0; }
html.dark-mode .wFeatureIcon { background: #2b3a48; color: #cfe4f5; }
html.dark-mode .wWikiCard .wItemName { color: #8cc4ee; }
html.dark-mode .wPlainList li { border-color: #3a3a3a; }
html.dark-mode .wAv1, html.dark-mode .wAv2, html.dark-mode .wAv3, html.dark-mode .wAv4, html.dark-mode .wAv5 { background: #3a4754 !important; color: #ffffff !important; }
.wPkList li form { margin-left: auto; }
