body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.language-nav-item {
  align-items: center;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.32);
}

.language-switch { display: flex; align-items: center; gap: 4px; }
.language-switch a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}
.language-switch a:hover,
.language-switch a[aria-current="page"] { color: var(--uz-blue); background: #fff; }

@media (max-width: 760px) {
  .language-nav-item { margin: 8px 0 0; padding: 8px 0 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.32); }
  .language-switch a { min-height: 38px; }
}

.bodycomp-main {
  flex: 1 0 auto;
  padding-block: 34px 48px;
}

.tool-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 22px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--uz-border-neutral);
  border-radius: var(--uz-radius);
  background: var(--uz-white);
}

.tool-intro h1 {
  margin: 0 0 8px;
  color: var(--uz-text);
  font-family: var(--uz-font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.tool-intro p {
  max-width: 72ch;
  margin: 0 0 5px;
  color: var(--uz-muted);
}

.intro-reference {
  font-weight: 700;
}

.tool-intro .tool-switch {
  margin-top: 9px;
}

.batch-link {
  font-weight: 700;
}

.more-info-btn {
  min-width: max-content;
  min-height: 44px;
  border-radius: 4px;
  border-color: var(--uz-blue);
  color: var(--uz-blue);
  font-weight: 800;
}

.more-info-btn:hover {
  border-color: var(--uz-blue);
  background: var(--uz-blue);
}

.bodycomp-card {
  overflow: hidden;
  border: 1px solid var(--uz-border-neutral);
  border-radius: var(--uz-radius);
  background: var(--uz-white);
  box-shadow: var(--uz-shadow);
}

.app-section-title {
  padding: 16px clamp(20px, 3vw, 30px);
  border-bottom: 1px solid var(--uz-border);
  background: var(--uz-soft);
}

.app-section-title h2 {
  margin: 0;
  color: var(--uz-blue);
  font-family: var(--uz-font-heading);
  font-size: 1.35rem;
  font-weight: 800;
}

.app-section-body {
  padding: clamp(20px, 3vw, 30px);
}

.engine-status {
  margin-bottom: 26px;
  padding: 12px 16px;
  border-radius: 4px;
}

.control-group,
.measurements {
  min-width: 0;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}

.control-group legend,
.measurements legend,
.results-column h3 {
  float: none;
  width: auto;
  margin: 0 0 14px;
  color: var(--uz-text);
  font-family: var(--uz-font-heading);
  font-size: 1.2rem;
  font-weight: 800;
}

.measurements {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px dotted var(--uz-border);
}

.field-group {
  margin-bottom: 18px;
}

.measurement-label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.measurement-label .form-label {
  margin-bottom: 6px;
}

.measurement-info {
  width: 21px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--uz-blue);
  border-radius: 50%;
  color: var(--uz-blue);
  background: var(--uz-white);
  font-family: Georgia, serif;
  font-size: 0.8rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.measurement-info:hover,
.measurement-info:focus-visible {
  color: var(--uz-white);
  background: var(--uz-blue);
  outline: 2px solid rgba(34, 61, 113, 0.24);
  outline-offset: 2px;
}

.form-label {
  margin-bottom: 6px;
  color: var(--uz-text);
  font-weight: 700;
}

.form-control,
.form-select {
  min-height: 44px;
  border-color: #b9c1c9;
  border-radius: 4px;
}

.form-control:hover,
.form-select:hover {
  border-color: var(--uz-link);
}

.form-check {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-check-input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0;
  border-color: #7d8792;
}

.form-check-input:checked {
  border-color: var(--uz-blue);
  background-color: var(--uz-blue);
}

.predict-actions {
  margin-top: 6px;
  padding-top: 22px;
  border-top: 1px dotted var(--uz-border);
}

.btn {
  min-height: 44px;
  border-radius: 4px;
  font-weight: 800;
}

.btn-primary {
  --bs-btn-bg: var(--uz-blue);
  --bs-btn-border-color: var(--uz-blue);
  --bs-btn-hover-bg: var(--uz-blue-dark);
  --bs-btn-hover-border-color: var(--uz-blue-dark);
  --bs-btn-active-bg: var(--uz-blue-dark);
  --bs-btn-active-border-color: var(--uz-blue-dark);
}

.results-column {
  min-width: 0;
  padding-left: clamp(12px, 3vw, 30px);
  border-left: 1px solid var(--uz-border-neutral);
}

.result-section {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px dotted var(--uz-border);
}

.prediction-box {
  min-height: 54px;
  padding: 14px 16px;
  border-left: 4px solid var(--uz-link);
  border-radius: 0 4px 4px 0;
  color: var(--uz-muted);
  background: var(--uz-soft);
}

#predictionBox strong {
  color: var(--uz-blue);
  font-size: 1.3rem;
}

.prediction-warning strong {
  color: inherit !important;
  font-size: inherit !important;
}

.table-responsive {
  border: 1px solid var(--uz-border-neutral);
  border-radius: 4px;
}

.table {
  min-width: 620px;
  margin-bottom: 0;
  vertical-align: middle;
}

.table thead th {
  color: var(--uz-white);
  background: var(--uz-blue);
  font-weight: 800;
}

.table > :not(caption) > * > * {
  padding: 10px;
}

#refsBox {
  color: var(--uz-muted);
}

#refsBox h5 {
  color: var(--uz-text);
  font-family: var(--uz-font-heading);
  font-weight: 800;
}

#refsBox li {
  margin-bottom: 7px;
}

.institutional-logos .logo-genud {
  height: 62px;
  aspect-ratio: 1;
}

.acknowledgements {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dotted var(--uz-border);
  color: var(--uz-muted);
}

.acknowledgements h5 {
  color: var(--uz-text);
  font-family: var(--uz-font-heading);
  font-weight: 800;
}

.acknowledgements p {
  margin-bottom: 0;
}

.muted {
  color: var(--uz-muted);
}

.info-pre {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-family: var(--uz-font);
  font-size: 0.98rem;
}

.modal-content {
  border: 0;
  border-radius: var(--uz-radius);
}

.modal-header {
  border-bottom-color: var(--uz-border);
  background: var(--uz-soft);
}

@media (max-width: 991px) {
  .results-column {
    margin-top: 8px;
    padding-top: 28px;
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    border-top: 1px solid var(--uz-border-neutral);
    border-left: 0;
  }
}

@media (max-width: 680px) {
  .bodycomp-main {
    padding-block: 18px 34px;
  }

  .tool-intro {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
  }

  .more-info-btn {
    align-self: flex-start;
  }

  .app-section-body {
    padding-inline: 18px;
  }

  .table {
    font-size: 0.9rem;
  }

  .institutional-logos .logo-genud {
    height: 41px;
  }
}

@media (max-width: 540px) {
  .institutional-logos .logo-genud {
    display: none;
  }

  .site-title {
    font-size: 0.86rem;
    letter-spacing: -0.01em;
  }
}
