/* Mania Denti - small additions on top of the design system */

/* Keep anchored sections clear of the fixed navbar */
section[id] {
  scroll-margin-top: 80px;
}

/* Keep menu items on one line ("Как работим") */
.navbar .nav-link {
  white-space: nowrap;
}

/* Quiet step numbers - 01, 02... */
.md-step-number {
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  color: #8392ab;
}

/* Text links inside the content */
.md-link {
  color: #344767;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.md-link:hover {
  color: #000;
}

/* Blog - square preview image in the list */
.md-post-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Blog - article body imported from the old blog */
.md-article {
  font-size: 1.05rem;
  line-height: 1.75;
}

.md-article figure {
  margin: 2rem 0;
}

.md-article img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.md-article figcaption {
  font-size: 0.875rem;
  color: #8392ab;
  text-align: center;
  margin-top: 0.5rem;
}

/* Check-up questionnaires (/checkup) */
.md-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 2rem;
}

.md-tab {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0.75rem 0.25rem 0.85rem;
  font-weight: 600;
  color: #8392ab;
  text-align: left;
}

.md-tab[aria-selected="true"],
.md-tab:hover {
  color: #344767;
  border-bottom-color: #344767;
}

.md-set-title {
  margin-bottom: 0.5rem;
}

.md-qs {
  list-style: none;
  margin: 0;
  padding: 0;
}

.md-q {
  padding: 1.35rem 0;
  border-top: 1px solid #e9ecef;
}

.md-q-text {
  font-size: 1.05rem;
  color: #344767;
  margin-bottom: 0.85rem;
}

.md-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.md-chip {
  position: relative;
  margin: 0;
}

.md-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.md-chip span {
  display: inline-block;
  min-width: 4.5rem;
  text-align: center;
  padding: 0.45rem 0.95rem;
  border: 1px solid #dee2e6;
  border-radius: 999px;
  color: #344767;
  background: #fff;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.md-chip span:hover {
  border-color: #8392ab;
}

.md-chip input:checked + span {
  background: #344767;
  border-color: #344767;
  color: #fff;
}

.md-chip input:focus-visible + span,
.md-tab:focus-visible,
.md-checkup summary:focus-visible {
  outline: 2px solid #344767;
  outline-offset: 3px;
}

.md-checkup details {
  margin-top: 0.7rem;
}

.md-checkup summary {
  display: inline-block;
  cursor: pointer;
  color: #8392ab;
  font-size: 0.875rem;
  list-style: none;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.md-checkup summary::-webkit-details-marker {
  display: none;
}

.md-checkup details p {
  margin: 0.5rem 0 0;
  font-size: 0.925rem;
}

.md-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
}

.md-reset {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  color: #8392ab;
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  margin-left: auto;
}

.md-result {
  margin-top: 2rem;
  border: 1px solid #dee2e6;
  border-radius: 0.75rem;
  padding: 1.5rem 1.35rem;
  scroll-margin-top: 90px;
}

.md-scale {
  display: flex;
  gap: 6px;
  margin-bottom: 1.1rem;
}

.md-scale i {
  display: block;
  width: 2.25rem;
  height: 4px;
  border-radius: 2px;
  background: #dee2e6;
}

.md-scale i.on {
  background: #344767;
}

.md-urgent-note {
  background: #f6eae2;
  color: #8a4b2a;
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  font-weight: 600;
}

.md-marked {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e9ecef;
}

.md-marked ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.md-marked li {
  padding: 0.65rem 0;
  border-top: 1px solid #e9ecef;
}

.md-marked li:first-child {
  border-top: 0;
  padding-top: 0;
}

.md-mq {
  color: #344767;
  margin-bottom: 0.25rem;
}

.md-mq small {
  color: #8392ab;
  margin-left: 0.4rem;
  white-space: nowrap;
}

.md-mw {
  margin: 0;
  font-size: 0.925rem;
}

@media (max-width: 480px) {
  .md-tab {
    font-size: 0.8rem;
  }

  .md-reset {
    margin-left: 0;
  }
}

/* Section separator - a thin line instead of decorations */
.md-divider {
  border-top: 1px solid #e9ecef;
}
