* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  color: #252a30;
  background: #fff;
}
body {
  margin: 0;
  min-width: 320px;
  font-size: 16px;
  line-height: 1.6;
}
a {
  color: #145a91;
}
a:hover {
  color: #0b3e67;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #f0b429;
  outline-offset: 2px;
}
.container {
  width: min(100% - 32px, 1040px);
  margin-inline: auto;
}
.site-header {
  background: #173f63;
  border-bottom: 1px solid #0f304c;
}
.navbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 10px;
}
.logo {
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px 18px;
}
.nav-links a {
  color: #fff;
  font-size: 14px;
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.page-content {
  min-height: 55vh;
  padding-block: 28px 44px;
}
.intro {
  padding: 20px 22px;
  margin-bottom: 22px;
  background: #f3f5f7;
  border: 1px solid #d7dce1;
}
h1,
h2,
h3 {
  line-height: 1.25;
  color: #202a33;
}
h1 {
  margin: 0 0 8px;
  font-size: 30px;
}
h2 {
  font-size: 21px;
}
h3 {
  font-size: 17px;
}
.intro p {
  margin: 0;
  color: #4e5963;
}
.calculator-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.calculator-box,
.tool-panel,
.content-panel {
  background: #fff;
  border: 1px solid #d7dce1;
  padding: 20px;
}
.calculator-box h2 {
  margin: 0 0 7px;
}
.calculator-box p {
  margin: 0 0 16px;
  color: #515b65;
}
.button,
button {
  display: inline-block;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid #124d7e;
  border-radius: 3px;
  background: #17639c;
  color: #fff;
  font: inherit;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button:hover,
button:hover {
  background: #124d7e;
  color: #fff;
}
.button-secondary {
  background: #fff;
  color: #263746;
  border-color: #aeb8c1;
}
.button-secondary:hover {
  background: #edf1f4;
  color: #202a33;
}
.breadcrumbs {
  margin: 0 0 14px;
  color: #5c6670;
  font-size: 14px;
}
.breadcrumbs a {
  color: #145a91;
}
.tool-panel {
  max-width: 760px;
  margin-bottom: 20px;
}
.tool-panel h2 {
  margin: 0 0 16px;
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.field label {
  font-weight: 700;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #aeb8c1;
  border-radius: 2px;
  background: #fff;
  color: #252a30;
  font: inherit;
}
.field textarea {
  min-height: 130px;
  resize: vertical;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 17px;
}
.result {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #b7c9d7;
  background: #f1f6fa;
}
.result:empty {
  display: none;
}
.result p {
  margin: 4px 0;
}
.error {
  color: #9f1d20;
  font-weight: 700;
}
.result.error {
  border-color: #d6aaaa;
  background: #fff5f5;
}
.explanation,
.content-panel {
  max-width: 800px;
}
.explanation {
  margin-top: 22px;
}
.explanation h2 {
  margin: 0 0 8px;
}
.explanation p {
  margin: 0 0 12px;
}
.content-panel h2 {
  margin: 20px 0 7px;
}
.content-panel h2:first-child {
  margin-top: 0;
}
.content-panel p,
.content-panel ul {
  margin-top: 0;
}
.site-footer {
  background: #f0f2f4;
  border-top: 1px solid #d7dce1;
  padding: 25px 0 12px;
}
.footer-content {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 24px;
}
.footer-content h2 {
  margin: 0 0 8px;
  font-size: 17px;
}
.footer-content p {
  margin: 0;
}
.footer-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-content a {
  font-size: 14px;
}
.copyright {
  margin: 20px 16px 0;
  padding-top: 10px;
  border-top: 1px solid #d7dce1;
  text-align: center;
  color: #535d66;
  font-size: 14px;
}
.contact-note {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f3f5f7;
  border: 1px solid #d7dce1;
}
.contact-field-spaced {
  margin-top: 15px;
}
@media (max-width: 760px) {
  .navbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .nav-links {
    justify-content: flex-start;
    gap: 6px 14px;
  }
  .nav-links a {
    padding-block: 3px;
  }
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
  .footer-content > :first-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1040px);
  }
  h1 {
    font-size: 26px;
  }
  .calculator-list,
  .tool-grid,
  .footer-content {
    grid-template-columns: 1fr;
  }
  .footer-content > :first-child {
    grid-column: auto;
  }
  .intro,
  .calculator-box,
  .tool-panel,
  .content-panel {
    padding: 16px;
  }
  .form-actions button {
    flex: 1 1 130px;
  }
}
