html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: #eeeeee;
  color: #5f6368;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  line-height: 1.45;
}

.site-header {
  background: #ffffff;
  border-bottom: 1px solid #dcdcdc;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
}

.navbar {
  padding: 14px 0;
}

.navbar-brand {
  padding: 0;
  margin: 0;
  text-decoration: none;
}

.brand-title {
  margin: 0;
  color: #1e8a55;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 400;
}

.navbar-nav .nav-link {
  color: #555555;
  font-size: 17px;
  font-weight: 600;
  padding-left: 16px !important;
  padding-right: 16px !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: #1e8a55;
}

.page {
  width: 100%;
}

.content-box {
  max-width: 1035px;
  margin: 0 auto 28px;
  padding: 30px 38px;
  background: #ffffff;
  border: 1px solid #dddddd;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .05);
}

.tool-box {
  padding-top: 26px;
}

h2,
label {
  display: block;
  margin: 0 0 6px;
  color: #969696;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
}

.intro h2,
.info-box h2,
.faq-box h2 {
  color: #1e8a55;
  font-size: 32px;
  font-weight: 500;
  margin-bottom: 10px;
}

.intro p {
  max-width: 955px;
  margin: 0 0 34px;
  font-size: 21px;
  color: #666666;
}

.info-box p {
  margin: 0 0 18px;
  color: #666666;
  font-size: 18px;
}

.info-box p:last-child {
  margin-bottom: 0;
}

a {
  color: #555555;
  text-decoration: underline;
}

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

textarea,
select {
  width: 100%;
  border: 1px solid #c9c9c9;
  border-radius: 4px;
  background: #ffffff;
  color: #4c4c4c;
  font: inherit;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .05);
}

textarea {
  min-height: 267px;
  padding: 8px 14px;
  resize: vertical;
}

textarea::placeholder {
  color: #949494;
}

select {
  height: 43px;
  padding: 0 14px;
  font-size: 18px;
}

.controls-row {
  display: grid;
  grid-template-columns: minmax(280px, 450px) 1fr;
  gap: 52px;
  align-items: end;
}

.advanced-toggle {
  align-self: center;
  margin-top: 28px;
  border: 0;
  background: transparent;
  color: #1e88e5;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.advanced-toggle:hover,
.advanced-toggle:focus {
  text-decoration: underline;
}

.advanced {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 8px 22px;
  max-width: 700px;
  margin: -4px 0 18px;
  padding: 14px;
  border: 1px solid #d4d4d4;
  border-radius: 4px;
  background: #f7f7f7;
}

.advanced label {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: #666666;
  font-size: 16px;
  font-weight: 400;
}

.advanced input {
  width: 16px;
  height: 16px;
}

.button-row {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
}

button {
  border-radius: 0;
  font: inherit;
  cursor: pointer;
}

.primary,
.secondary {
  min-height: 57px;
  padding: 0 20px;
  font-size: 24px;
  border: 1px solid #cfcfcf;
}

.primary {
  background: #30a944;
  border-color: #30a944;
  color: #ffffff;
}

.primary:hover,
.primary:focus {
  background: #258f36;
  border-color: #258f36;
}

.secondary {
  background: #ffffff;
  color: #333333;
}

.secondary:hover,
.secondary:focus {
  background: #f7f7f7;
}

.result-panel {
  margin-top: 30px;
}

.result-panel textarea {
  min-height: 220px;
}

.stats {
  margin-top: 8px;
  color: #777777;
  font-size: 16px;
}

.output-buttons {
  justify-content: flex-start;
}

.accordion-item {
  border-color: #dddddd;
}

.accordion-button {
  color: #555555;
  font-size: 18px;
  font-weight: 700;
}

.accordion-button:not(.collapsed) {
  color: #1e8a55;
  background: #f3fbf6;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .08);
}

.accordion-button:focus {
  border-color: #30a944;
  box-shadow: 0 0 0 .2rem rgba(48, 169, 68, .18);
}

.accordion-body {
  color: #666666;
  font-size: 17px;
}

.site-footer {
  padding: 24px 0;
  background: #ffffff;
  border-top: 1px solid #dcdcdc;
  color: #666666;
  font-size: 16px;
}

.site-footer nav {
  display: flex;
  gap: 16px;
}

.site-footer a {
  color: #555555;
  font-weight: 600;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: #30a944;
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease, background .2s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}

.back-to-top:hover,
.back-to-top:focus {
  background: #258f36;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 991px) {
  .navbar-collapse {
    padding-top: 14px;
  }

  .navbar-nav .nav-link {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .content-box {
    padding: 22px 18px;
    border-radius: 10px;
  }

  .brand-title {
    font-size: 28px;
  }

  .intro h2,
  .info-box h2,
  .faq-box h2 {
    font-size: 27px;
  }

  .intro p {
    margin-bottom: 32px;
    font-size: 18px;
  }

  .info-box p {
    font-size: 16px;
  }

  .controls-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .advanced-toggle {
    margin-top: 0;
  }

  .advanced {
    grid-template-columns: 1fr;
  }

  .button-row {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .primary,
  .secondary {
    min-height: 48px;
    font-size: 20px;
  }

  .site-footer nav {
    flex-wrap: wrap;
  }
}

.policy-page .content-box {
  max-width: 980px;
}

.page-hero {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e2e2e2;
}

.page-hero h1 {
  margin: 0 0 10px;
  color: #1e8a55;
  font-size: 38px;
  line-height: 1.2;
  font-weight: 600;
}

.page-hero p {
  max-width: 850px;
  margin: 0;
  color: #666666;
  font-size: 19px;
}

.page-content h2 {
  margin: 26px 0 10px;
  color: #1e8a55;
  font-size: 25px;
  font-weight: 600;
}

.page-content h3 {
  margin: 20px 0 8px;
  color: #555555;
  font-size: 21px;
  font-weight: 700;
}

.page-content p,
.page-content li {
  color: #666666;
  font-size: 17px;
}

.page-content p {
  margin: 0 0 15px;
}

.page-content ul {
  margin: 0 0 18px 22px;
  padding: 0;
}

.page-content .notice-box {
  margin: 20px 0;
  padding: 18px 20px;
  border-left: 4px solid #30a944;
  background: #f3fbf6;
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
  margin: 18px 0 6px;
}

.contact-card {
  padding: 18px;
  border: 1px solid #dddddd;
  border-radius: 10px;
  background: #fafafa;
}

.contact-card strong {
  display: block;
  margin-bottom: 8px;
  color: #1e8a55;
  font-size: 18px;
}

@media (max-width: 760px) {
  .page-hero h1 {
    font-size: 31px;
  }

  .page-hero p {
    font-size: 17px;
  }

  .page-content h2 {
    font-size: 23px;
  }

  .contact-list {
    grid-template-columns: 1fr;
  }
}


.site-logo { margin-right: 12px; flex: 0 0 auto; }
.footer-inner { display: flex; flex-direction: column; gap: 18px; }
.footer-pages { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: flex-end; }
.language-switcher { display: flex; flex-wrap: wrap; gap: 5px 6px; align-items: center; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.18); }
.language-link { display: inline-flex; align-items: center; gap: 0; text-decoration: none; line-height: 1; }
.language-link img { width: 24px; height: 24px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.language-link span { font-size: 14px; }
.language-link[aria-current="true"] { font-weight: 700; }
@media (max-width: 760px) { .footer-pages { justify-content: flex-start; } .language-switcher { align-items: flex-start; } }

.language-switcher { justify-content: center; }
