:root {
  --brand-red: #b01f24;
  --brand-red-dark: #951a1f;
  --rule: #eb932c;
  --text: #212529;
  --muted: #6c757d;
  --surface: #ffffff;
  --link: #0d6efd;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--surface);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.site-header {
  background: var(--surface);
}

.navbar {
  width: min(1296px, calc(100% - 18px));
  min-height: 57px;
  margin: 0 auto;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  min-width: 107px;
  min-height: 54px;
}

.navbar-brand img {
  display: block;
  width: 107px;
  height: 25px;
}

.language-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0;
}

.language-actions button {
  min-height: 28px;
  border: 1px solid #f8f9fa;
  border-radius: 3px;
  background: #f8f9fa;
  color: #000000;
  padding: 4px 8px;
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
}

.page-shell {
  width: min(1296px, calc(100% - 18px));
  margin: 0 auto;
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--rule);
}

.message {
  width: 100%;
  margin-top: 0;
  padding: 0 12px;
  text-align: center;
  font-size: 16px;
}

.message a {
  color: var(--link);
  text-decoration: underline;
  font-weight: 400;
}

.message a:hover,
.message a:focus {
  color: var(--brand-red-dark);
}

.site-footer {
  width: min(1296px, calc(100% - 18px));
  margin: 0 auto;
  padding: 17px 0 0;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  font-size: 16px;
  line-height: 1.5;
}

.footer-copy {
  flex: 1 1 auto;
}

.footer-contact {
  flex: 0 0 auto;
  text-align: right;
}

.site-footer a {
  color: #dc3545;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--brand-red-dark);
  text-decoration: underline;
}

@media (max-width: 520px) {
  .navbar {
    width: calc(100% - 24px);
    min-height: 0;
    margin: 0 auto;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 0;
  }

  .navbar-brand {
    display: block;
    min-height: auto;
    margin-right: 16px;
    padding: 5px 0;
    font-size: 20px;
    line-height: 30px;
  }

  .navbar-brand img {
    display: inline-block;
    vertical-align: middle;
  }

  .language-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .page-shell,
  .site-footer {
    width: calc(100% - 24px);
    margin: 0 auto;
  }

  .message {
    padding: 0;
  }

  .site-footer {
    flex-direction: column;
    gap: 0;
    padding-top: 16px;
  }

  .footer-contact {
    text-align: left;
  }
}
