@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0400-052F, U+2116;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-024F, U+2000-206F;
}

@font-face {
  font-family: "Noto Sans";
  src: url("/assets/fonts/noto-sans-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0400-052F, U+2116;
}

@font-face {
  font-family: "Noto Sans";
  src: url("/assets/fonts/noto-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-024F, U+2000-206F;
}

:root {
  --vm-primary: #0d5b54;
  --vm-primary-hover: #094943;
  --vm-accent: #d39a32;
  --vm-ink: #22313a;
  --vm-muted: #627179;
  --vm-canvas: #f3f7f5;
  --vm-surface: #ffffff;
  --vm-soft: #e2f0ec;
  --vm-border: #d8e4e0;
  --vm-danger: #b42318;
  --vm-post-alt: #f8fbfa;
  --vm-post-target: #eff8f5;
  --vm-code-surface: #f6f9f8;
  --vm-quote-nested: #f7fbfa;
}

html {
  background: var(--vm-canvas);
  color-scheme: light dark;
  scroll-behavior: smooth;
}

body,
input,
button,
select,
textarea {
  font-family: "Noto Sans", Arial, sans-serif;
}

body {
  background: var(--vm-canvas);
  color: var(--vm-ink);
  font-size: 14px;
  line-height: 1.55;
}

h1,
h2,
h3,
.forumtitle,
.topic-title,
.forabg .header a,
.forumbg .header a {
  font-family: "Manrope", Arial, sans-serif;
}

.forum-title,
.topic-title {
  margin-right: 0;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.wrap {
  max-width: 1320px;
  min-width: 290px;
  margin: 24px auto;
  padding: 0 20px 24px;
  background: transparent;
  border: 0;
}

.headerbar {
  position: relative;
  isolation: isolate;
  min-height: 164px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px 8px 0 0;
  background: var(--vm-primary);
  color: #f3f7f5;
  overflow: hidden;
}

.headerbar > .inner {
  position: relative;
  isolation: isolate;
  min-height: 164px;
  padding: 22px 24px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.site-description {
  position: relative;
  z-index: 2;
  width: min(48%, 540px);
  height: 64px;
  margin: 0;
}

.vm-logo {
  display: inline-flex;
  max-width: 100%;
  min-height: 64px;
  align-items: center;
}

.vm-logo img {
  display: block;
  width: 540px;
  max-width: 100%;
  height: auto;
}

.vm-header-media {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.vm-header-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 64%;
}

.vm-header-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(13 91 84 / 0.98) 0%, rgb(13 91 84 / 0.92) 38%, rgb(13 91 84 / 0.46) 67%, rgb(9 43 40 / 0.18) 100%),
    linear-gradient(0deg, rgb(7 41 38 / 0.72) 0%, transparent 50%);
}

.search-header {
  position: absolute;
  z-index: 3;
  top: auto;
  right: 24px;
  bottom: 20px;
  width: min(410px, 46%);
  border-radius: 6px;
  box-shadow: none;
}

.search-header .inputbox {
  min-height: 42px;
  border: 1px solid rgb(255 255 255 / 0.46);
  background: rgb(255 255 255 / 0.94);
  color: #22313a;
}

.navbar {
  margin: 0 0 22px;
  padding: 0 12px;
  border: 1px solid var(--vm-border);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: var(--vm-surface);
}

.navbar a,
.linklist > li a {
  color: var(--vm-primary);
}

.nav-main > li > a,
.nav-breadcrumbs > li > a,
.breadcrumbs .crumb a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

a {
  color: var(--vm-primary);
}

a:hover,
a:focus {
  color: var(--vm-primary-hover);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--vm-accent);
  outline-offset: 2px;
}

.forabg,
.forumbg {
  margin: 0 0 18px;
  padding: 0;
  border: 1px solid var(--vm-border);
  border-radius: 8px;
  background: var(--vm-surface);
  overflow: hidden;
}

.forabg .header,
.forumbg .header {
  color: #f3f7f5;
  background: var(--vm-primary);
}

.forabg .header a,
.forumbg .header a,
.forabg .header dd,
.forumbg .header dd {
  color: #f3f7f5;
  font-weight: 700;
}

ul.topiclist li {
  color: var(--vm-ink);
}

ul.topiclist li.row {
  border-color: var(--vm-border);
  background: var(--vm-surface);
  transition: background-color 180ms ease;
}

ul.topiclist li.row:hover {
  background: #edf5f2;
}

li.row:hover dd {
  border-left-color: var(--vm-border);
}

li.row strong {
  color: var(--vm-ink);
}

.topiclist.forums dl.row-item,
.topiclist.forums dl.row-item dt {
  background-image: none !important;
}

.topiclist.forums .row-item .list-inner {
  min-height: 66px;
  padding-left: 72px;
}

.topiclist.forums .forum-image {
  position: absolute;
  left: 14px;
  top: 10px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  float: none;
  box-sizing: border-box;
  border: 1px solid #bfd9d2;
  border-radius: 12px;
  background: var(--vm-soft);
}

.topiclist.forums .forum-image img {
  display: block;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  object-fit: contain;
  filter: invert(30%) sepia(16%) saturate(1507%) hue-rotate(126deg) brightness(86%) contrast(93%);
}

.forum_unread .forum-image,
.forum_unread_locked .forum-image,
.forum_unread_subforum .forum-image {
  border-color: var(--vm-accent);
}

.forum_unread .forum-image::after,
.forum_unread_locked .forum-image::after,
.forum_unread_subforum .forum-image::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--vm-surface);
  border-radius: 50%;
  background: var(--vm-accent);
}

a.forumtitle,
a.topictitle {
  color: var(--vm-ink);
  font-weight: 700;
}

a.forumtitle {
  font-size: 17px;
}

.topiclist dd,
.topiclist dt {
  border-color: var(--vm-border);
}

.panel,
.post,
.bg1,
.bg2 {
  color: var(--vm-ink);
  border-color: var(--vm-border);
  background: var(--vm-surface);
}

.panel,
.post {
  border-radius: 8px;
}

.post {
  margin-bottom: 14px;
  border: 1px solid var(--vm-border);
}

.post.bg2 {
  background: var(--vm-post-alt);
}

.post:target {
  color: var(--vm-ink);
  border-color: var(--vm-primary);
  background: var(--vm-post-target);
  box-shadow: inset 3px 0 0 var(--vm-primary);
}

.postprofile {
  color: var(--vm-muted);
  border-color: var(--vm-border);
}

.postprofile dt,
.postprofile dd,
.postprofile strong {
  color: var(--vm-muted);
}

.postprofile .avatar img,
.postprofile img.avatar {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  object-fit: cover;
}

.postbody .content {
  color: var(--vm-ink);
  font-size: 16px;
  line-height: 1.65;
}

.postbody h3,
.postbody h3 a,
.postbody h3 a:visited,
.postbody h3 a.first-unread,
.post:target .postbody h3,
.post:target .postbody h3 a {
  color: var(--vm-primary);
}

.postbody h3 a:hover,
.postbody h3 a:focus {
  color: var(--vm-primary-hover);
}

.post:target .postbody .content {
  color: var(--vm-ink);
}

.postbody .author,
.postbody .author time,
.postbody .author a {
  color: var(--vm-muted);
}

.postbody .content a {
  padding: 1px 3px;
  color: var(--vm-primary);
  border-radius: 3px;
  background: var(--vm-soft);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.postbody .content a:hover,
.postbody .content a:focus {
  color: #f3f7f5;
  background: var(--vm-primary);
}

.postbody blockquote {
  color: var(--vm-ink);
  border-color: var(--vm-border);
  border-left: 3px solid var(--vm-primary);
  background: var(--vm-soft);
}

.postbody blockquote blockquote {
  background: var(--vm-quote-nested);
}

.postbody blockquote blockquote blockquote {
  background: var(--vm-soft);
}

.postbody blockquote cite,
.postbody blockquote cite a,
.postbody .uncited {
  color: var(--vm-muted);
}

.postbody .codebox,
.postbody .attachbox {
  color: var(--vm-ink);
  border-color: var(--vm-border);
  background: var(--vm-code-surface);
}

.postbody .codebox p,
.postbody .attachbox p {
  color: var(--vm-muted);
  border-color: var(--vm-border);
}

.postbody .codebox code {
  color: var(--vm-ink);
  background: transparent;
}

.postbody .notice,
.postbody .signature {
  color: var(--vm-muted);
  border-color: var(--vm-border);
}

.postbody .notice a,
.postbody .signature a {
  color: var(--vm-primary);
}

.posthilit {
  color: #22313a;
  background: var(--vm-accent);
}

.postbody .content img,
.postbody img.postimage {
  max-width: 100%;
  height: auto;
}

.vm-reputation {
  color: var(--vm-primary) !important;
  font-weight: 700;
}

.vm-post-action {
  width: auto;
  min-width: 44px;
  min-height: 38px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.vm-post-delete {
  color: var(--vm-danger) !important;
}

.button,
.button1,
.button2,
input.button1,
input.button2 {
  min-height: 40px;
  border-color: #a9c9c1;
  border-radius: 6px;
  box-shadow: none;
  color: var(--vm-primary);
  background: var(--vm-surface);
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.button1,
input.button1 {
  border-color: var(--vm-primary);
  color: #f3f7f5;
  background: var(--vm-primary);
}

.button:hover,
.button2:hover,
.button1:hover,
input.button1:hover,
input.button2:hover {
  border-color: var(--vm-primary-hover);
  color: #f3f7f5;
  background: var(--vm-primary-hover);
}

.inputbox,
input.inputbox,
textarea.inputbox,
select {
  min-height: 42px;
  border-color: #a9beb8;
  border-radius: 6px;
  color: var(--vm-ink);
  background: var(--vm-surface);
}

textarea.inputbox {
  min-height: 180px;
}

.pagination li a,
.pagination li span {
  min-width: 36px;
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
}

.pagination li.active span {
  border-color: var(--vm-primary);
  background: var(--vm-primary);
}

.vm-footer {
  padding: 18px 12px 6px;
  color: var(--vm-muted);
}

.vm-medical-note {
  max-width: 820px;
  margin: 0 auto 14px;
  line-height: 1.55;
}

.vm-error-page {
  min-height: 100dvh;
  margin: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  background: var(--vm-canvas);
}

.vm-error-card {
  width: min(100%, 680px);
  padding: 34px;
  border: 1px solid var(--vm-border);
  border-radius: 12px;
  color: var(--vm-ink);
  background: var(--vm-surface);
}

.vm-error-card > img {
  width: min(100%, 540px);
  height: auto;
  padding: 12px;
  border-radius: 8px;
  background: var(--vm-primary);
}

.vm-error-card h1 {
  margin: 10px 0;
  color: var(--vm-ink);
  font-size: clamp(28px, 5vw, 44px);
}

.vm-error-code {
  margin: 28px 0 0;
  color: var(--vm-accent);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.vm-error-card .button1 {
  margin-top: 12px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

@media (max-width: 1099px) {
  .vm-header-media img {
    object-position: 68% center;
  }
}

@media (max-width: 700px) {
  .wrap {
    margin: 0 auto;
    padding: 0 10px 16px;
  }

  .headerbar,
  .headerbar > .inner {
    min-height: 130px;
  }

  .headerbar > .inner {
    padding: 16px;
  }

  .site-description {
    width: 100%;
    height: auto;
  }

  .vm-logo {
    max-width: 100%;
  }

  .vm-logo img {
    width: 100%;
    max-width: 480px;
  }

  .vm-header-media {
    display: none;
  }

  .search-header {
    right: 16px;
    bottom: 14px;
    width: calc(100% - 32px);
  }

  .navbar {
    padding: 0 8px;
  }

  .topiclist.forums .row-item .list-inner {
    padding-left: 56px;
  }

  .topiclist.forums .forum-image {
    left: 8px;
    top: 10px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .topiclist.forums .forum-image img {
    width: 22px;
    height: 22px;
  }

  .postprofile .avatar img,
  .postprofile img.avatar {
    width: 64px;
    height: 64px;
    border-radius: 12px;
  }

  .postprofile {
    min-height: 80px;
  }

  .vm-post-action span {
    display: none;
  }

  .vm-error-page {
    padding: 12px;
  }

  .vm-error-card {
    padding: 22px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --vm-primary: #5dc4b7;
    --vm-primary-hover: #79d4c8;
    --vm-accent: #e1b35c;
    --vm-ink: #eaf3f0;
    --vm-muted: #aec0bb;
    --vm-canvas: #101716;
    --vm-surface: #16201e;
    --vm-soft: #20312d;
    --vm-border: #31423e;
    --vm-danger: #ff8a80;
    --vm-post-alt: #192522;
    --vm-post-target: #1c2b27;
    --vm-code-surface: #0f1716;
    --vm-quote-nested: #1d2c29;
  }

  .headerbar,
  .forabg .header,
  .forumbg .header {
    background: #173c37;
  }

  .search-header .inputbox {
    border-color: #5d7771;
    color: var(--vm-ink);
    background: #16201e;
  }

  ul.topiclist li.row:hover {
    background: #1c2926;
  }

  .topiclist.forums .forum-image img {
    filter: invert(77%) sepia(15%) saturate(998%) hue-rotate(123deg) brightness(89%) contrast(86%);
  }

  .postbody .content a:hover,
  .postbody .content a:focus,
  .button1,
  input.button1 {
    color: #101716;
  }

  .postbody .content a:visited {
    color: #8ccfc5;
  }

  .postbody .codebox code {
    color: #d7efe8;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
