/* === Layout === */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f7f6f2;
  color: #2e2e2e;
  line-height: 1.6;
}

a {
  color: #555;
  text-decoration: none;
}

a:hover {
  color: #000;
}

header {
  background: #e0e0e0;
  color: #2e2e2e;
  padding: 24px 40px;
  border-bottom: 1px solid #ccc;
}

header h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
}

nav {
  margin-top: 10px;
}

nav a {
  margin-right: 24px;
  color: #2e2e2e;
  font-weight: 500;
}

main {
  margin: 0 auto;
  background: white;
  padding: 40px 30px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.04);
  margin-top: 200px; /* отступ под высоту header */
}

/* === Typography === */
h1, h2, h3 {
  color: #2a2a2a;
  margin-top: 0;
  font-weight: 600;
}

p {
  margin-bottom: 1em;
}

ul {
  padding-left: 20px;
  margin-top: 0;
  margin-bottom: 1em;
}

/* === Form === */
form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: -webkit-fill-available;
  background-color: #fff;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

input[type="checkbox"],
input[type="radio"] {
  margin-right: 8px;
}

/* === Button === */
button,
a.button {
    display: inline-block;
    text-align: center;
    padding: 14px;
    font-size: 16px;
    background-color: #696969;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
    width: -webkit-fill-available;
}

button:hover,
a.button:hover {
  background-color: #b0b0b0;
}

/* === Footer === */
footer {
  text-align: center;
  background: #e0e0e0;
  padding: 20px;
  margin-top: 60px;
  border-top: 1px solid #bbb;
  color: #333;
  font-size: 14px;
}

button {
  background-color: #2e7d67 !important;
}

header {
  background-color: #fdfcfb !important;
}

footer {
  background-color: #fdfcfb !important;
}

h1, a {
  color: #2f2f2f !important;
}

/* === Responsive === */
@media (max-width: 768px) {
  header {
    padding: 16px;
  }

  header h1 {
    font-size: 20px;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
  }

  nav a {
    display: inline-block;
    padding: 8px 12px;
    background: #fff;
    border-radius: 6px;
    font-weight: 500;
    border: 1px solid #ccc;
    font-size: 14px;
    color: #2e2e2e !important;
  }

  main {
    padding: 20px 16px;
    box-shadow: none;
    border-radius: 0;
    margin-top: 260px; /* отступ под высоту header */
  }

  form {
    gap: 10px;
  }

  input,
  select,
  textarea,
  button,
  a.button {
    font-size: 16px;
    width: 100%;
  }

  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: none;
  }

  table th,
  table td {
    white-space: nowrap;
  }

  .button,
  button {
    padding: 14px;
    font-size: 16px;
    width: 100%;
  }

  img {
    max-width: 100%;
    height: auto;
  }
}

p, li, a {
  font-size: 20px;
}