/* Header and footer from the MKD Online dashboard, isolated from legacy styles. */
body.mkd-shell {
  margin: 0;
  padding: 0;
  width: auto !important;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.mkd-shell .site-header, .mkd-shell .site-footer {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.mkd-shell .site-header, .mkd-shell .site-footer,
.mkd-shell .site-header *, .mkd-shell .site-footer * { box-sizing: border-box; }
.mkd-shell .site-header {
  position: relative;
  z-index: 2;
  display: block;
  flex: none;
  min-height: 0;
  padding: 0;
  border: 0;
  background: #fff;
}
.mkd-shell .header-inner, .mkd-shell .footer-inner {
  width: min(1320px, calc(100% - 128px));
  margin-inline: auto;
}
.mkd-shell .header-inner {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.mkd-shell .site-header a { text-decoration: none; }
.mkd-shell .site-header a:focus-visible {
  outline: 3px solid #66d7b5;
  outline-offset: 5px;
}
.mkd-shell .site-header .icon {
  display: block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.mkd-shell .site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 17px;
  color: #101e23;
  font-size: 29px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: normal;
  white-space: nowrap;
}
.mkd-shell .site-header .brand-mark {
  width: 43px;
  height: 43px;
  color: #087562;
  stroke-width: 1.7;
}
.mkd-shell .site-header .brand-accent { color: #087562; }
.mkd-shell .header-actions { display: flex !important; align-items: center; gap: 34px; }
.mkd-shell .free-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #637078;
  font-size: 14px;
  white-space: nowrap;
}
.mkd-shell .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #087562; }
.mkd-shell .site-header .account-link {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 22px;
  color: #fff;
  background: #104b3f;
  border: 1px solid #104b3f;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  line-height: normal;
  white-space: nowrap;
  transition: background .15s;
}
.mkd-shell .site-header .account-link:hover { background: #0b3a30; }
.mkd-shell .site-header .account-link .icon { width: 20px; height: 20px; }
.mkd-shell > main { flex: 1; }
.mkd-shell .site-footer {
  flex: none;
  padding: 0;
  margin-top: auto;
  border: 0;
  background: #142b26;
}
.mkd-shell .footer-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  line-height: normal;
}
.mkd-legacy .skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  padding: 12px 18px;
  background: #fff;
  color: #101e23;
  border-radius: 8px;
  transform: translateY(-180%);
}
.mkd-legacy .skip-link:focus { transform: translateY(0); }
.mkd-legacy.full .content {
  box-sizing: border-box;
  position: relative;
  left: auto;
  width: calc(100% - 100px);
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 auto;
  padding: 0 0 50px;
  overflow-x: auto;
}
.mkd-legacy .site-header { border-bottom: 1px solid #e6ece8; }
.mkd-shell .mkd-workspace-header { min-height: 104px; gap: 28px; }
.mkd-primary-nav { display: flex; flex: 1; align-items: center; justify-content: center; gap: 5px; min-width: 0; }
.mkd-shell .site-header .mkd-nav-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; margin: 0; padding: 12px 14px;
  color: #596a62; background: transparent; border: 1px solid transparent; border-radius: 11px;
  font-size: 14px; font-weight: 600; line-height: 1.25; letter-spacing: -.15px;
  white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.mkd-shell .site-header .mkd-nav-link:hover { background: #f3f7f5; color: #153f32; }
.mkd-shell .site-header .mkd-nav-link.is-active { background: #edf8f2; color: #087562; border-color: #d4eade; }
.mkd-shell .site-header .mkd-nav-link .icon { width: 19px; height: 19px; }
.mkd-shell .site-header summary { list-style: none; }
.mkd-shell .site-header summary::-webkit-details-marker { display: none; }
.mkd-shell .site-header summary:focus-visible { outline: 3px solid #66d7b5; outline-offset: 4px; }
.mkd-admin, .mkd-profile { position: relative; flex-shrink: 0; }
.mkd-shell .site-header .mkd-admin summary > .icon:last-child { width: 14px; height: 14px; }
.mkd-shell .site-header details[open] > summary { background: #f3f7f5; }
.mkd-profile { margin-left: auto; min-width: 0; }
.mkd-profile-trigger { display: flex; align-items: center; gap: 10px; max-width: 228px; min-height: 54px; padding: 6px 8px; border: 1px solid transparent; border-radius: 13px; cursor: pointer; }
.mkd-profile-trigger:hover { border-color: #e2eae5; background: #f8faf9; }
.mkd-avatar { width: 40px; height: 40px; display: grid; place-items: center; flex-shrink: 0; border-radius: 50%; color: #087562; background: #edf5f0; }
.mkd-shell .site-header .mkd-avatar .icon { width: 20px; height: 20px; }
.mkd-profile-copy { display: flex; min-width: 0; flex-direction: column; gap: 5px; line-height: 1.2; }
.mkd-user-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1b3027; font-size: 14px; font-weight: 600; letter-spacing: -.15px; }
.mkd-user-meta { color: #77867d; font-size: 12px; white-space: nowrap; }
.mkd-shell .site-header .mkd-profile-trigger > .icon { width: 16px; height: 16px; color: #7a8b80; }
.mkd-popup { position: absolute; z-index: 120; top: calc(100% + 12px); left: 0; width: 236px; max-width: calc(100vw - 36px); padding: 8px; background: #fff; border: 1px solid #dfe8e2; border-radius: 14px; box-shadow: 0 16px 44px #173e2924; }
.mkd-popup-caption { display: block; padding: 8px 10px; color: #7b8981; font-size: 11px; font-weight: 500; line-height: 1.4; }
.mkd-shell .site-header .mkd-popup a { display: flex; align-items: center; gap: 10px; padding: 11px 10px; border-radius: 8px; color: #344e41; font-size: 13px; font-weight: 500; line-height: 1.4; }
.mkd-shell .site-header .mkd-popup a:hover, .mkd-shell .site-header .mkd-popup a[aria-current="page"] { color: #087562; background: #edf8f2; }
.mkd-shell .site-header .mkd-popup .icon { width: 18px; height: 18px; }
.mkd-profile-popup { right: 0; left: auto; width: 260px; }
.mkd-profile-info { display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 16px; margin-bottom: 6px; border-bottom: 1px solid #edf1ee; }
.mkd-profile-info .mkd-popup-caption { padding: 0; }
.mkd-profile-info strong { color: #203c2c; font-size: 15px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.mkd-profile-info > span:last-child { color: #77867d; font-size: 12px; }
.mkd-shell .site-header .mkd-popup a.mkd-signout { color: #9b5349; }
.mkd-shell .site-header .mkd-popup a.mkd-signout:hover { color: #924339; background: #fcf3f0; }
@media (max-width: 1200px) {
  .mkd-shell .header-inner, .mkd-shell .footer-inner { width: calc(100% - 80px); }
  .mkd-shell .header-inner { min-height: 88px; }
  .mkd-shell .site-header .brand { font-size: 25px; gap: 12px; }
}
@media (max-width: 1000px) {
  .mkd-shell .header-inner, .mkd-shell .footer-inner, .mkd-legacy.full .content { width: calc(100% - 48px); }
  .mkd-shell .header-actions { gap: 20px; }
  .mkd-shell .free-label { font-size: 12px; }
  .mkd-shell .site-header .account-link { font-size: 12px; padding-inline: 16px; }
}
@media (max-width: 640px) {
  .mkd-shell .header-inner, .mkd-shell .footer-inner, .mkd-legacy.full .content { width: calc(100% - 36px); }
  .mkd-shell .header-inner { min-height: 76px; gap: 10px; }
  .mkd-shell .site-header .brand { gap: 8px; font-size: 20px; letter-spacing: -.7px; }
  .mkd-shell .site-header .brand-mark { width: 31px; height: 34px; }
  .mkd-shell .free-label { display: none; }
  .mkd-shell .site-header .account-link { min-height: 40px; padding: 10px 12px; font-size: 11px; border-radius: 9px; }
  .mkd-shell .site-header .account-link .icon { display: none; }
  .mkd-shell .footer-inner { min-height: 60px; font-size: 12px; }
}
@media (max-width: 360px) {
  .mkd-shell .site-header .brand { font-size: 18px; }
  .mkd-shell .site-header .account-link { padding-inline: 8px; font-size: 10px; }
}
@media (max-width: 1380px) and (min-width: 1181px) {
  .mkd-shell .mkd-workspace-header { gap: 20px; }
  .mkd-shell .mkd-workspace-header .brand { font-size: 25px; gap: 12px; }
  .mkd-shell .mkd-workspace-header .brand-mark { width: 35px; height: 35px; }
  .mkd-shell .site-header .mkd-nav-link { font-size: 13px; padding-inline: 11px; gap: 7px; }
  .mkd-profile-trigger { max-width: 195px; gap: 8px; }
  .mkd-avatar { width: 36px; height: 36px; }
}
@media (max-width: 1320px) {
  .mkd-shell .mkd-workspace-header { flex-wrap: wrap; min-height: 0; padding-block: 18px 12px; gap: 14px 24px; }
  .mkd-primary-nav { order: 2; flex-basis: 100%; justify-content: flex-start; padding-top: 10px; border-top: 1px solid #edf1ee; }
}
@media (max-width: 640px) {
  .mkd-shell .mkd-workspace-header { padding-block: 12px 10px; gap: 12px 10px; }
  .mkd-profile-trigger { min-height: 40px; max-width: 160px; padding: 4px 5px; gap: 7px; }
  .mkd-avatar { width: 32px; height: 32px; }
  .mkd-user-name { font-size: 12px; }
  .mkd-user-meta { display: none; }
  .mkd-primary-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 6px; width: 100%; }
  .mkd-shell .site-header .mkd-nav-link { flex-direction: column; min-height: 68px; gap: 6px; padding: 9px 4px; font-size: 11.5px; text-align: center; white-space: normal; }
  .mkd-shell .site-header .mkd-nav-link .icon { width: 20px; height: 20px; }
  .mkd-admin { grid-column: 1 / -1; justify-self: start; }
  .mkd-shell .site-header .mkd-admin summary { flex-direction: row; min-height: 38px; gap: 7px; padding: 8px 12px; font-size: 12px; }
  .mkd-profile-popup { top: calc(100% + 10px); }
}
@media (max-width: 400px) {
  .mkd-profile-trigger { max-width: 120px; }
  .mkd-avatar { display: none; }
}
@media (prefers-reduced-motion: reduce) { .mkd-shell .account-link, .mkd-shell .mkd-nav-link { transition: none; } }
