:root {
  --primary-color: navy;
  --bg-color: #f4f7f6;
  --text-color: #333;
  --card-bg: #fff;
  --light-blue: #4362debd;
}

body {
  text-align: center;
  justify-content: center;
  background-color: var(--bg-color);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  flex-direction: column;
  margin: 0;
}
/*чтобы плавно пролистывались секции сайта*/
html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

html,
body {
  min-height: 100vh;
  margin: 0;
}

main {
  flex: 1;
}

.headline {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 0;
  align-items: center;
}

/*line where's h1*/
.second-line {
  background: #4362de35;
  margin: 0;
  min-height: 7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -1rem;
  margin-right: -1rem;
  z-index: -10;
}

.first-hr {
  margin-top: 0;
}

h2 {
  color: var(--primary-color);
}

/*for all sections the same /\*/

/*where's calculator*/
.calculator-box {
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  padding-top: 0;
  margin-top: 3rem;
  align-items: center;
  border: 0.1rem var(--light-blue) solid;
  overflow: hidden;
}

/*everything inside of it is centred horizontally*/
.calculator-box .line {
  justify-content: left;
  text-align: left;
}

main p {
  font-size: 1.25rem;
  text-align: left;
  color: #333;
}

/*dividing line*/
hr {
  height: 0.2rem;
  background-color: var(--light-blue);
  border: none;
  margin-left: -1rem;
  margin-right: -1rem;
}

/*Monthly salary (non-taxed): input*/
.pre-month {
  padding: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: none;
  color: var(--light-blue);
  border-radius: 0.5rem;
  font-size: 1.25rem;
  margin: 1rem;
  max-width: fit-content;
  width: 5rem;
}

/*styles fo sliders*/
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; /* Override default look */
  appearance: none;
  width: 1.5rem; /* Set a specific slider handle width */
  height: 1.5rem; /* Slider handle height */
  cursor: pointer; /* Cursor on hover */
}

.slider {
  margin: 1rem;
  width: 10rem;
}

/*Types of Work*/
/*Work-Type-Selector*/
select {
  height: 2.5rem;
  border: 0.1rem #33333347 solid;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  color: #333;
  border-radius: 0.5rem;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  margin-left: 0;
  cursor: pointer;
}

/* * sign for selector*/
.important {
  color: red;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 0;
}

.notice {
  color: green;
}

/*checboxes*/
.checkbox {
  align-items: center;
  display: inline-flex;
  gap: 0.5rem;
  font-size: 1rem;
}

.checkbox label,
input {
  cursor: pointer;
}

/*table*/
table {
  border: 1;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-radius: 0.5rem;
  margin-left: auto;
  margin-right: auto;
}

td,
th {
  padding: 1rem;
}

th {
  background: #4362de35;
  font-size: 1.15rem;
}

.minimum-age td,
th {
  border: 1px var(--light-blue) solid;
}

.minimum-age {
  border-collapse: collapse;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.arrow-right-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: #333;
}

.before {
  color: green;
  text-align: center;
}

.after {
  color: red;
  text-align: center;
}

/*tax rates*/

/*for different screen types*/

/*a bit smaller Desktop*/
@media (min-width: 40rem) {
  .calculator-box {
    min-width: 60%;
    margin-right: auto;
    margin-left: auto;
  }
  .line p, input {
  display: inline-flex;
  align-items: center;
  }
}

/*Desktop*/
@media (min-width: 48rem) {
  .calculator-box {
    width: 40%;
    margin-right: auto;
    margin-left: auto;
  }
  .minimum-age {
    width: 60%;
    margin-left: auto;
    margin-right: auto;
  }
  .line p, input {
  display: inline-flex;
  align-items: center;
  }
}

/*Phone*/
@media (max-width: 48rem) {
  .calculator-box {
    margin-right: 1rem;
    margin-left: 1rem;
  }
  .minimum-age {
    margin-left: 2rem;
    margin-right: 2rem;
  }
  .line p, input {
  align-items: center;
  }
}

/*Phone*/
@media (max-width: 48rem) {
  body {
    zoom: 0.85; /* Простой и надёжный способ */
  }
}