/* =========================================================
   Base
========================================================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #7d7d7d;
  color: #111111;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

a {
  color: #000080;
}

a:hover {
  color: #800080;
}

/* =========================================================
   Shared Retro Button Style
========================================================= */

.side-box a,
.button-link,
.admin-form button,
.danger-form button,
.admin-table button,
.guide-item button,
.nav-toggle,
.document-chip,
.site-modal-close,
.site-modal-actions button {
  border: 2px solid;
  border-color: #ffffff #777777 #777777 #ffffff;
  background: #d4d0c8;
  color: #000080;
  text-decoration: none;
  cursor: pointer;
}

.side-box a:hover,
.button-link:hover,
.admin-form button:hover,
.danger-form button:hover,
.admin-table button:hover,
.guide-item button:hover,
.nav-toggle:hover,
.document-chip:hover,
.site-modal-close:hover,
.site-modal-actions button:hover {
  background: #e6e2dc;
}

.side-box a:active,
.button-link:active,
.admin-form button:active,
.danger-form button:active,
.admin-table button:active,
.guide-item button:active,
.nav-toggle:active,
.document-chip:active,
.site-modal-close:active,
.site-modal-actions button:active {
  border-color: #777777 #ffffff #ffffff #777777;
  background: #c5c1ba;
  transform: translate(1px, 1px);
}

/* =========================================================
   Site Shell
========================================================= */

.site-wrap {
  width: min(1380px, calc(100vw - 24px));
  min-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  margin: 12px auto;
  background: #ffffff;
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow:
    inset 1px 1px 0 #ffffff,
    inset -1px -1px 0 #777777;
}

.site-header {
  min-height: 100px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  background:
    linear-gradient(to right, #ffffff 0%, #f6f6f6 55%, #dce6f5 100%);
  border-bottom: 6px solid #1f3f66;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.site-header h1 {
  margin: 0;
  color: #172f4d;
  font-family: "Times New Roman", Times, serif;
  font-size: 34px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.site-header p {
  margin: 2px 0 0;
  color: #4d4d4d;
  font-weight: bold;
}

.header-right {
  align-self: center;
  text-align: right;
  color: #333333;
  font-size: 12px;
  line-height: 1.5;
}

.site-body {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 640px;
  flex: 1;
}

.site-sidebar {
  padding: 14px;
  background: #d4d0c8;
  border-right: 2px solid #808080;
}

.site-main {
  padding: 18px;
  background:
    linear-gradient(to right, #ffffff 0%, #ffffff 70%, #f5f5f5 100%);
}

.site-footer {
  padding: 8px 14px;
  background: #d4d0c8;
  border-top: 2px solid #808080;
  color: #333333;
  font-size: 12px;
  margin-top: auto;
}

.site-footer>span {
  display: block;
  margin-top: 2px;
  color: #555555;
}

/* =========================================================
   Collapsible Navigation Tree
========================================================= */

.site-nav-tree {
  display: grid;
  gap: 6px;
}

.nav-tree-item {
  display: grid;
  gap: 4px;
}

.nav-tree-row {
  display: grid;
  align-items: stretch;
  gap: 4px;
}

.nav-tree-row.has-children {
  grid-template-columns: 24px 1fr;
}

.nav-tree-row.no-children {
  grid-template-columns: 1fr;
}

.nav-toggle {
  width: 24px;
  min-height: 35px;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: bold;
}

.site-nav-tree a {
  display: block;
  min-height: 35px;
  padding: 7px 8px;
  border: 2px solid;
  border-color: #ffffff #777777 #777777 #ffffff;
  background: #d4d0c8;
  color: #000080;
  text-decoration: none;
}

.site-nav-tree a:hover {
  background: #e6e2dc;
  color: #800080;
}

.site-nav-tree a:active {
  border-color: #777777 #ffffff #ffffff #777777;
  background: #c5c1ba;
  transform: translate(1px, 1px);
}

.site-nav-tree a.nav-active {
  background: #1f3f66;
  color: #ffffff;
  font-weight: bold;
}

.nav-children {
  display: grid;
  gap: 4px;
  margin-left: 28px;
  padding-left: 8px;
  border-left: 2px dotted #777777;
}

.nav-children[hidden] {
  display: none;
}

.nav-children .nav-tree-row.has-children {
  grid-template-columns: 20px 1fr;
}

.nav-children .nav-tree-row.no-children {
  grid-template-columns: 1fr;
}

.nav-children .nav-toggle {
  width: 20px;
  min-height: 31px;
}

.nav-children a {
  min-height: 31px;
  padding: 6px 8px;
  font-size: 13px;
}

.nav-children .nav-children a {
  font-size: 12px;
}

/* =========================================================
   Administration Sidebar
========================================================= */

.side-box {
  margin-top: 20px;
  padding: 10px;
  background: #eeeeee;
  border: 2px solid;
  border-color: #777777 #ffffff #ffffff #777777;
}

.side-box strong {
  display: block;
  margin-bottom: 8px;
}

.side-box a {
  display: block;
  margin-top: 6px;
  padding: 6px 8px;
}

/* =========================================================
   Content Cards
========================================================= */

.content-card {
  margin-bottom: 18px;
  padding: 16px;
  background: #ffffff;
  border: 3px solid #6f6f6f;
  box-shadow:
    inset 1px 1px 0 #ffffff,
    inset -1px -1px 0 #8b8b8b,
    2px 2px 0 #bfbfbf;
}

.content-card h2 {
  margin: 0 0 10px;
  color: #172f4d;
  font-family: "Times New Roman", Times, serif;
  font-size: 30px;
  font-weight: normal;
}

.content-card h3 {
  color: #172f4d;
}

.page-excerpt {
  margin-top: -4px;
  color: #555555;
  font-style: italic;
}

.page-meta {
  margin-top: 18px;
  padding-top: 8px;
  border-top: 1px solid #cccccc;
  color: #666666;
  font-size: 12px;
}

.recent-list {
  padding-left: 20px;
}

.recent-list li {
  margin-bottom: 8px;
}

.recent-list span {
  display: block;
  color: #555555;
  font-size: 13px;
}

/* =========================================================
   Markdown Content
========================================================= */

.markdown-content {
  line-height: 1.5;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
  font-family: "Times New Roman", Times, serif;
  color: #172f4d;
}

.markdown-content img {
  max-width: min(420px, 100%);
  height: auto;
  display: block;
  margin: 14px auto;
  padding: 6px;
  background: #ffffff;
  border: 2px solid #3f3f3f;
  box-shadow:
    0 0 0 1px #ffffff,
    0 0 0 3px #8a8a8a,
    0 0 0 4px #2f2f2f;
}

.markdown-content table,
.info-table,
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  background: #f2f2f2;
}

.markdown-content th,
.markdown-content td,
.info-table td,
.admin-table th,
.admin-table td {
  padding: 7px 9px;
  border: 1px solid #999999;
}

.info-table td:first-child {
  width: 180px;
  color: #000080;
  font-weight: bold;
  background: #e6ebf4;
}

/* =========================================================
   Markdown Colours
========================================================= */

.md-color-red,
.site-footer .md-color-red,
.site-header .md-color-red {
  color: #8b0000;
  font-weight: bold;
}

.md-color-blue,
.site-footer .md-color-blue,
.site-header .md-color-blue {
  color: #000080;
  font-weight: bold;
}

.md-color-green,
.site-footer .md-color-green,
.site-header .md-color-green {
  color: #1f5f2f;
  font-weight: bold;
}

.md-color-gold,
.site-footer .md-color-gold,
.site-header .md-color-gold {
  color: #8a6d00;
  font-weight: bold;
}

.md-color-gray,
.site-footer .md-color-gray,
.site-header .md-color-gray {
  color: #555555;
}

.md-color-black,
.site-footer .md-color-black,
.site-header .md-color-black {
  color: #000000;
}

.md-color-white,
.site-footer .md-color-white,
.site-header .md-color-white {
  color: #ffffff;
  background: #333333;
  padding: 1px 4px;
}

.md-color-maroon,
.site-footer .md-color-maroon,
.site-header .md-color-maroon {
  color: #7a1d1d;
  font-weight: bold;
}

.md-color-navy,
.site-footer .md-color-navy,
.site-header .md-color-navy {
  color: #172f4d;
  font-weight: bold;
}

.md-color-olive,
.site-footer .md-color-olive,
.site-header .md-color-olive {
  color: #3f5132;
  font-weight: bold;
}

.md-color-red a,
.md-color-blue a,
.md-color-green a,
.md-color-gold a,
.md-color-maroon a,
.md-color-navy a,
.md-color-olive a {
  color: inherit;
  text-decoration: underline;
}

/* =========================================================
   Markdown Alignment
========================================================= */

.md-align-left {
  text-align: left;
  width: 100%;
}

.md-align-center {
  text-align: center;
  width: 100%;
}

.md-align-right {
  text-align: right;
  width: 100%;
}

.md-align-justify {
  text-align: justify;
  width: 100%;
}

.site-footer .md-align-left,
.site-footer .md-align-center,
.site-footer .md-align-right,
.site-footer .md-align-justify {
  display: block;
}

.md-align-center img,
.md-align-right img,
.md-align-left img {
  display: inline-block;
}

.md-align-center .document-chip,
.md-align-right .document-chip,
.md-align-left .document-chip {
  display: inline-flex;
}

/* =========================================================
   Markdown Images
========================================================= */

.markdown-content img.markdown-image {
  max-width: min(320px, 100%);
  height: auto;
  display: block;
  margin: 14px auto;
  padding: 6px;
  background: #ffffff;
  border: 2px solid #3f3f3f;
  box-shadow:
    0 0 0 1px #ffffff,
    0 0 0 3px #8a8a8a,
    0 0 0 4px #2f2f2f;
}

.markdown-content img.img-small {
  max-width: min(180px, 100%);
}

.markdown-content img.img-medium {
  max-width: min(320px, 100%);
}

.markdown-content img.img-large {
  max-width: min(520px, 100%);
}

.markdown-content img.img-full {
  max-width: 100%;
}

.markdown-content img.img-plain {
  max-width: min(320px, 100%);
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* =========================================================
   Page Template Styles
========================================================= */

.page-template {
  position: relative;
  overflow: hidden;
}

.template-ribbon {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  border: 2px solid;
  border-color: #ffffff #777777 #777777 #ffffff;
  background: #d4d0c8;
  color: #111111;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.template-standard {
  background: #ffffff;
}

.template-standard .template-ribbon {
  background: #d4d0c8;
  color: #172f4d;
}

.template-notice {
  background: #fff8d8;
  border-color: #8a7a30;
  box-shadow:
    inset 1px 1px 0 #ffffff,
    inset -1px -1px 0 #b5a85d,
    2px 2px 0 #bfbfbf;
}

.template-notice .template-ribbon {
  background: #7a1d1d;
  color: #ffffff;
  border-color: #c78b8b #3f1010 #3f1010 #c78b8b;
}

.template-notice h2::before {
  content: "NOTICE: ";
  color: #7a1d1d;
  font-weight: bold;
}

.template-document {
  background:
    linear-gradient(#ffffff, #fbfbf2);
  border-color: #444444;
}

.template-document .template-ribbon {
  background: #1f3f66;
  color: #ffffff;
  border-color: #6d8fb8 #0d2038 #0d2038 #6d8fb8;
}

.template-document .markdown-content {
  padding: 18px;
  background: #fffef2;
  border: 1px solid #b9b18a;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
}

.template-document .markdown-content h2,
.template-document .markdown-content h3 {
  text-transform: uppercase;
  letter-spacing: 1px;
}

.template-unit {
  background: #f3f6f0;
  border-color: #3d5136;
}

.template-unit .template-ribbon {
  background: #314728;
  color: #ffffff;
  border-color: #78966b #182511 #182511 #78966b;
}

.template-unit h2 {
  color: #314728;
}

/* =========================================================
   Subpages / Sections
========================================================= */

.subpage-panel {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 2px solid #c0c0c0;
}

.subpage-panel h3 {
  margin: 0 0 10px;
  color: #172f4d;
  font-family: "Times New Roman", Times, serif;
  font-size: 24px;
}

.subpage-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.subpage-card {
  display: block;
  min-height: 82px;
  padding: 10px;
  border: 2px solid;
  border-color: #ffffff #777777 #777777 #ffffff;
  background: #d4d0c8;
  color: #111111;
  text-decoration: none;
}

.subpage-card:hover {
  background: #e6e2dc;
}

.subpage-card:active {
  border-color: #777777 #ffffff #ffffff #777777;
  transform: translate(1px, 1px);
}

.subpage-card strong {
  display: block;
  color: #000080;
  font-size: 16px;
  text-decoration: underline;
}

.subpage-card span {
  display: block;
  margin-top: 5px;
  color: #333333;
  font-size: 13px;
  line-height: 1.3;
}

.subpage-card.template-notice {
  background: #fff8d8;
}

.subpage-card.template-document {
  background: #fffef2;
}

.subpage-card.template-unit {
  background: #edf4e8;
}

/* =========================================================
   Media Library
========================================================= */

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.media-card {
  padding: 10px;
  background: #eeeeee;
  border: 2px solid;
  border-color: #ffffff #777777 #777777 #ffffff;
}

.media-card img {
  width: 100%;
  height: 130px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid #999999;
}

.media-card strong {
  display: block;
  margin-top: 8px;
  word-break: break-word;
}

.media-card span {
  display: block;
  margin-top: 4px;
  color: #555555;
  font-size: 12px;
  word-break: break-word;
}

.media-actions {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.document-icon {
  height: 130px;
  display: grid;
  place-items: center;
  background: #ffffff;
  border: 1px solid #999999;
  color: #172f4d;
  font-family: "Times New Roman", Times, serif;
  font-size: 28px;
  font-weight: bold;
}

/* =========================================================
   Reference Cards
========================================================= */

.reference-section {
  margin: 18px 0;
  padding: 12px;
  background: #eeeeee;
  border: 2px solid;
  border-color: #777777 #ffffff #ffffff #777777;
}

.reference-section h3 {
  margin: 0 0 10px;
  color: #172f4d;
  font-family: "Times New Roman", Times, serif;
  font-size: 24px;
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.reference-card {
  display: block;
  margin: 10px 0;
  padding: 12px;
  background: #d4d0c8;
  border: 2px solid;
  border-color: #ffffff #777777 #777777 #ffffff;
  color: #111111;
  text-decoration: none;
}

.reference-grid .reference-card {
  margin: 0;
}

.reference-card:hover {
  background: #e6e2dc;
}

.reference-card:active {
  border-color: #777777 #ffffff #ffffff #777777;
  transform: translate(1px, 1px);
}

.reference-card strong {
  display: block;
  color: #000080;
  font-size: 17px;
  text-decoration: underline;
}

.reference-card span:not(.reference-label) {
  display: block;
  margin-top: 5px;
  color: #333333;
  font-size: 13px;
  line-height: 1.35;
}

.reference-label {
  display: inline-block;
  margin-bottom: 7px;
  padding: 2px 6px;
  background: #172f4d;
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.reference-notice {
  background: #fff8d8;
  border-color: #ffffff #8a7a30 #8a7a30 #ffffff;
}

.reference-notice .reference-label {
  background: #7a1d1d;
}

.reference-document {
  background: #fffef2;
  border-color: #ffffff #777777 #777777 #ffffff;
}

.reference-document .reference-label {
  background: #1f3f66;
}

.reference-unit {
  background: #edf4e8;
}

.reference-unit .reference-label {
  background: #314728;
}

.reference-release {
  background: #eaf0ff;
}

.reference-release .reference-label {
  background: #263d7a;
}

.reference-photo {
  background: #f4f4f4;
}

.reference-photo .reference-label {
  background: #444444;
}

.missing-reference {
  color: #600000;
  background: #ffe2e2;
  border-color: #cc7777;
}

/* =========================================================
   Document Chips
========================================================= */

.document-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  margin: 4px 4px 4px 0;
  padding: 5px 9px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: bold;
  vertical-align: middle;
  box-shadow:
    inset 1px 1px 0 #ffffff,
    inset -1px -1px 0 #9a9a9a;
}

.document-chip-icon {
  min-width: 28px;
  padding: 2px 4px;
  background: #1f3f66;
  color: #ffffff;
  border: 1px solid #0d2038;
  font-size: 10px;
  line-height: 1;
  text-align: center;
}

.document-chip-google .document-chip-icon {
  background: #1f6f43;
  border-color: #0d3a22;
}

.document-chip-local .document-chip-icon {
  background: #1f3f66;
  border-color: #0d2038;
}

.document-chip-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.document-chip-arrow {
  color: #333333;
  font-size: 12px;
}

.document-chip-missing {
  display: inline-block;
  margin: 4px 0;
  padding: 5px 9px;
  background: #ffe2e2;
  border: 1px solid #aa0000;
  color: #600000;
  font-weight: bold;
}

/* =========================================================
   Notices
========================================================= */

.site-notices {
  display: grid;
  gap: 6px;
  padding: 8px 14px;
  background: #d4d0c8;
  border-bottom: 2px solid #808080;
}

.site-notice {
  padding: 8px 10px;
  border: 2px solid;
  border-color: #ffffff #777777 #777777 #ffffff;
  background: #eeeeee;
  color: #111111;
}

.site-notice strong {
  display: block;
  margin-bottom: 2px;
}

.site-notice span {
  display: block;
  line-height: 1.35;
}

.notice-info {
  background: #eaf0ff;
}

.notice-warning {
  background: #fff8d8;
}

.notice-urgent {
  background: #ffe2e2;
  color: #600000;
}

.notice-success {
  background: #e5ffe2;
  color: #174d17;
}

/* =========================================================
   Dashboard
========================================================= */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-tile {
  min-height: 100px;
  padding: 14px;
  background: #d4d0c8;
  border: 2px solid;
  border-color: #ffffff #777777 #777777 #ffffff;
  text-decoration: none;
}

.dashboard-tile strong {
  display: block;
  margin-bottom: 8px;
  color: #172f4d;
  font-size: 20px;
}

.dashboard-tile span {
  color: #111111;
}

/* =========================================================
   Forms / Admin Tables
========================================================= */

.admin-title-row,
.page-title-row,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-title-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.button-link {
  display: inline-block;
  padding: 6px 8px;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-form label {
  display: grid;
  gap: 4px;
}

.admin-form label span {
  font-weight: bold;
  color: #172f4d;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  padding: 7px;
  border: 2px solid;
  border-color: #777777 #ffffff #ffffff #777777;
  background: #ffffff;
  font: inherit;
}

.admin-form textarea {
  font-family: Consolas, "Courier New", monospace;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 120px 180px;
  gap: 10px;
  align-items: end;
}

.two-col {
  grid-template-columns: 1fr 1fr;
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
}

.checkbox-label input {
  width: auto;
}

.form-actions {
  justify-content: flex-start;
}

.admin-form button,
.danger-form button,
.admin-table button {
  display: inline-block;
  padding: 6px 8px;
  font: inherit;
}

.danger-form {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #aaaaaa;
}

.danger-form button {
  color: #8b0000;
}

.small-form {
  max-width: 480px;
  margin-bottom: 20px;
  padding: 12px;
  background: #eeeeee;
  border: 1px solid #aaaaaa;
}

.admin-table th {
  background: #1f3f66;
  color: #ffffff;
  text-align: left;
}

.error-box {
  padding: 10px;
  margin: 10px 0;
  background: #ffe2e2;
  border: 1px solid #aa0000;
  color: #600000;
}

.login-card {
  max-width: 520px;
}

/* =========================================================
   Permission Editor
========================================================= */

.permission-role-card {
  margin-bottom: 18px;
  padding: 12px;
  background: #eeeeee;
  border: 2px solid;
  border-color: #ffffff #777777 #777777 #ffffff;
}

.permission-role-card h3 {
  margin: 0 0 10px;
  color: #172f4d;
  font-family: "Times New Roman", Times, serif;
  font-size: 24px;
}

.permission-locked {
  opacity: 0.65;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.permission-check {
  display: flex !important;
  align-items: center;
  gap: 7px;
  padding: 6px;
  background: #ffffff;
  border: 1px solid #b0b0b0;
}

.permission-check input {
  width: auto !important;
}

.permission-check span {
  color: #111111 !important;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

/* =========================================================
   Reusable Modal Window
========================================================= */

.site-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: start center;
  padding-top: 14vh;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 80ms ease;
}

.site-modal-overlay.modal-open {
  opacity: 1;
  pointer-events: auto;
}

.site-modal-window {
  width: min(420px, calc(100vw - 28px));
  background: #d4d0c8;
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow:
    inset 1px 1px 0 #ffffff,
    inset -1px -1px 0 #777777,
    4px 4px 0 rgba(0, 0, 0, 0.35);
  font-family: Arial, Helvetica, sans-serif;
  transform: translateY(-8px);
  transition: transform 80ms ease;
}

.site-modal-overlay.modal-open .site-modal-window {
  transform: translateY(0);
}

.site-modal-titlebar {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px 0 8px;
  background: linear-gradient(to right, #00006d, #001099);
  color: #ffffff;
  font-size: 14px;
  font-weight: bold;
  user-select: none;
}

.site-modal-close {
  width: 20px;
  height: 18px;
  padding: 0;
  color: #000000;
  font-size: 14px;
  line-height: 12px;
  font-weight: bold;
}

.site-modal-close:active {
  border-color: #404040 #ffffff #ffffff #404040;
}

.site-modal-body {
  padding: 18px 18px 12px;
  color: #111111;
  background: #d4d0c8;
}

.site-modal-body p {
  margin: 0;
  line-height: 1.4;
}

.site-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 12px 12px;
}

.site-modal-actions button {
  min-width: 82px;
  padding: 5px 12px;
  color: #000000;
  font: inherit;
}

/* =========================================================
   Dynamic Token Help
========================================================= */

.token-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 10px 0 16px;
  padding: 10px;
  background: #eeeeee;
  border: 2px solid;
  border-color: #777777 #ffffff #ffffff #777777;
}

.token-help strong {
  margin-right: 6px;
  color: #172f4d;
}

.token-help code {
  display: inline-block;
  padding: 3px 6px;
  background: #ffffff;
  border: 1px solid #999999;
  color: #000080;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.token-note {
  margin: -8px 0 16px;
  color: #555555;
  font-size: 13px;
}

.token-note strong {
  color: #172f4d;
}

/* =========================================================
   Markdown Guide
========================================================= */

.markdown-guide {
  display: grid;
  gap: 18px;
  margin-top: 14px;
}

.guide-section {
  padding: 12px;
  background: #eeeeee;
  border: 2px solid;
  border-color: #ffffff #777777 #777777 #ffffff;
}

.guide-section h3 {
  margin: 0 0 6px;
  color: #172f4d;
  font-family: "Times New Roman", Times, serif;
  font-size: 24px;
}

.guide-section>p {
  margin: 0 0 12px;
  color: #444444;
}

.guide-items {
  display: grid;
  gap: 10px;
}

.guide-item {
  padding: 10px;
  background: #ffffff;
  border: 1px solid #b0b0b0;
}

.guide-item-header {
  display: grid;
  gap: 3px;
  margin-bottom: 8px;
}

.guide-item-header strong {
  color: #000080;
  font-size: 15px;
}

.guide-item-header span {
  color: #555555;
  font-size: 13px;
}

.guide-item pre {
  margin: 0 0 8px;
  padding: 9px;
  overflow-x: auto;
  background: #101010;
  color: #f4f4f4;
  border: 2px solid;
  border-color: #777777 #ffffff #ffffff #777777;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.guide-item button {
  display: inline-block;
  padding: 5px 10px;
  font: inherit;
}

/* =========================================================
   Smooth Page Navigation
========================================================= */

.site-main {
  transition:
    opacity 70ms ease,
    filter 70ms ease;
}

.site-main-loading {
  opacity: 0.72;
  filter: grayscale(0.08);
  pointer-events: none;
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 850px) {
  .site-body {
    grid-template-columns: 1fr;
  }

  .site-sidebar {
    border-right: none;
    border-bottom: 2px solid #808080;
  }

  .dashboard-grid,
  .form-row,
  .two-col {
    grid-template-columns: 1fr;
  }

  .site-header {
    display: block;
  }

  .header-right {
    margin-top: 10px;
    text-align: left;
  }
}

/* =========================================================
   Forms
========================================================= */

.public-form {
  display: grid;
  gap: 14px;
}

.form-question {
  margin: 0;
  padding: 12px;
  background: #eeeeee;
  border: 2px solid;
  border-color: #777777 #ffffff #ffffff #777777;
}

.form-question legend {
  padding: 0 6px;
  color: #172f4d;
  font-family: "Times New Roman", Times, serif;
  font-size: 20px;
  font-weight: bold;
}

.form-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #b0b0b0;
  cursor: pointer;
}

.form-option:hover {
  background: #f4f4f4;
}

.form-option input {
  margin-top: 2px;
}

.form-result {
  padding: 12px;
  background: #f7f7f7;
  border: 2px solid;
  border-color: #ffffff #777777 #777777 #ffffff;
}

.admin-table pre {
  max-width: 280px;
  overflow-x: auto;
  white-space: pre-wrap;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

/* =========================================================
   Collapsible Administration Box
========================================================= */

.admin-side-box {
  padding: 0;
  overflow: hidden;
}

.side-box-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid #aaaaaa;
  background: #eeeeee;
  color: #111111;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.side-box-toggle:hover {
  background: #e6e2dc;
}

.side-box-toggle strong {
  margin: 0;
}

.side-box-toggle span {
  min-width: 20px;
  padding: 1px 5px;
  border: 2px solid;
  border-color: #ffffff #777777 #777777 #ffffff;
  background: #d4d0c8;
  color: #000080;
  text-align: center;
  font-weight: bold;
}

.side-box-content {
  padding: 10px;
}

.side-box-content[hidden] {
  display: none;
}

.admin-side-box.side-box-collapsed .side-box-toggle {
  border-bottom: 0;
}

.page-tree-indent {
  display: inline-block;
  padding-left: calc(var(--page-depth, 0) * 18px);
}

.page-tree-indent::first-letter {
  color: inherit;
}

/* =========================================================
   Table Wrapping / Wider Page Table
========================================================= */

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.admin-table-pages {
  min-width: 1100px;
}

.admin-table-pages th,
.admin-table-pages td {
  vertical-align: top;
}

.admin-table-pages th:nth-child(1),
.admin-table-pages td:nth-child(1) {
  width: 39%;
}

.admin-table-pages th:nth-child(2),
.admin-table-pages td:nth-child(2) {
  width: 19%;
}

.admin-table-pages th:nth-child(3),
.admin-table-pages td:nth-child(3) {
  width: 13%;
  white-space: nowrap;
}

.admin-table-pages th:nth-child(4),
.admin-table-pages td:nth-child(4) {
  width: 9%;
  white-space: nowrap;
}

.admin-table-pages th:nth-child(5),
.admin-table-pages td:nth-child(5) {
  width: 5%;
  text-align: center;
  white-space: nowrap;
}

.admin-table-pages th:nth-child(6),
.admin-table-pages td:nth-child(6) {
  width: 6%;
  text-align: center;
  white-space: nowrap;
}

.admin-table-pages th:nth-child(7),
.admin-table-pages td:nth-child(7) {
  width: 9%;
  white-space: nowrap;
}

.admin-table-pages td:last-child a {
  display: inline-block;
}

.page-tree-indent {
  display: inline-block;
  padding-left: calc(var(--page-depth, 0) * 18px);
  line-height: 1.35;
}

/* =========================================================
   Page Manager Table
========================================================= */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 14px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  background: #f2f2f2;
}

.admin-table-pages {
  min-width: 980px;
  table-layout: fixed;
}

.admin-table-pages th,
.admin-table-pages td {
  padding: 8px 10px;
  border: 1px solid #999999;
  vertical-align: top;
}

.admin-table-pages th {
  background: #1f3f66;
  color: #ffffff;
  text-align: left;
  white-space: nowrap;
}

.admin-table-pages th:nth-child(1),
.admin-table-pages td:nth-child(1) {
  width: 34%;
}

.admin-table-pages th:nth-child(2),
.admin-table-pages td:nth-child(2) {
  width: 17%;
}

.admin-table-pages th:nth-child(3),
.admin-table-pages td:nth-child(3) {
  width: 14%;
}

.admin-table-pages th:nth-child(4),
.admin-table-pages td:nth-child(4) {
  width: 9%;
  white-space: nowrap;
}

.admin-table-pages th:nth-child(5),
.admin-table-pages td:nth-child(5) {
  width: 6%;
  text-align: center;
  white-space: nowrap;
}

.admin-table-pages th:nth-child(6),
.admin-table-pages td:nth-child(6) {
  width: 6%;
  text-align: center;
  white-space: nowrap;
}

.admin-table-pages th:nth-child(7),
.admin-table-pages td:nth-child(7) {
  width: 14%;
  white-space: nowrap;
}

.page-parent-row td {
  background: #f2f2f2;
}

.page-child-row td {
  background: #eeeeee;
}

.page-tree-indent {
  display: inline-block;
  padding-left: calc(var(--page-depth, 0) * 20px);
  line-height: 1.35;
}

.page-tree-arrow {
  color: #555555;
  font-weight: bold;
  margin-right: 4px;
}

.table-actions {
  white-space: nowrap;
}

.table-actions a {
  display: inline-block;
  margin-right: 6px;
}