:root {
  --md-primary-fg-color: rgb(17, 17, 17);
  --md-accent-fg-color: #4a5d76;
  --md-accent-fg-color--transparent: rgba(74, 93, 118, 0.12);
  --md-typeset-a-color: #2d3a4f;
}

.md-typeset a:focus,
.md-typeset a:hover {
  color: #4a5d76 !important;
  text-decoration: underline;
}

.account-modal-content {
  font-size: 12px !important;
}
.account-modal-btn {
  font-size: 12px !important;
}
body,
html {
  margin: 0;
  height: 100%;
}

button,
input,
textarea,
select,
option {
  font-family: 'Roboto Mono', monospace;
}

body header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 0 20px;
  height: 60px;
  background: #282c3b;
  color: white;
  font-family: 'JetBrains Mono', 'Roboto Mono', monospace;
}


#right-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.annex-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.main-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-family: 'JetBrains Mono', 'Roboto Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: #2a364d;
  color: #e0e6ed;
  border: 1px solid #4a5a7b;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.main-btn:hover {
  background: #3a4a6b;
  border-color: #667eea;
  color: #ffffff;
}

.logo img {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
}

.user-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(45deg, #667eea 0%, #282c3b 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
}

.user-emoji {
  font-size: 22px;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  letter-spacing: 0;
}

.annex-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #4a5a7b;
  background: #282c3b;
  color: #e0e6ed;
  text-align: center;
  margin-top: 50px;
}

.annex-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.annex-footer-links a {
  color: #e0e6ed;
  text-decoration: none;
}

.annex-footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.md-typeset {
  font-family: Arial, sans-serif;
}

.md-header,
.md-footer,
.md-banner {
  display: none !important;
}

.md-main {
  padding-top: 0 !important;
}

.md-main__inner {
  margin-top: 0 !important;
}

.frontpage-header-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(16, 32, 48, 0.08);
  /* background: rgba(255, 255, 255, 0.7); */
  color: #b1b1b1;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.62rem !important;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.frontpage-header-link:hover {
  filter: brightness(1.3);
}



@media (max-width: 1024px) {
  body {
    overflow-x: hidden;
  }

  body header {
    padding: 0 10px;
    gap: 8px;
    height: auto;
    min-height: 56px;
    align-items: center;
  }

  #add-buttons,
  #result-buttons,
  #right-group {
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: thin;
  }

  #add-buttons {
    flex: 1 1 auto;
  }

  #right-group {
    flex: 0 1 auto;
    min-width: 0;
  }

  .btn-default,
  .main-btn,
  .result-buttons,
  .tab-button {
    padding: 7px 10px;
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
  }

  body {
    overflow-y: auto;
  }

  body header {
    min-height: 52px;
    padding: 6px 8px;
    gap: 6px;
  }

  .logo img {
    max-height: 32px;
  }

  #add-buttons,
  #result-buttons {
    gap: 6px;
    padding-bottom: 2px;
  }

  #right-group {
    gap: 6px;
  }
}

.md-typeset .support-icon {
  display: block;
  margin: 0 auto;
  filter: invert(1) brightness(1.3) saturate(0.8);
  background: transparent;
  border-radius: 8px;
}

.md-typeset td .support-icon {
  vertical-align: middle;
}

@media (max-width: 480px) {
  body header {
    padding: 4px 6px;
    min-height: 48px;
  }

  .btn-default,
  .main-btn,
  .result-buttons {
    padding: 6px 8px;
    font-size: 11px;
    gap: 6px;
  }

  #add-buttons .btn-default span,
  #sub-header-appuis span,
  #sub-header-beam span,
  #sub-sub-header-arc span,
  #sub-header-charges span {
    display: none;
  }

  #right-group {
    max-width: 42vw;
  }
}
@media screen and (max-width: 76.1875em) {
  .md-tabs {
    display: block;
  }
  .md-tabs__list {
    overflow-x: auto;
    white-space: nowrap;
  }
}