:root {
  --blue: #2962ff;
  --blue-light: #8ec5ff;
}

* {
  box-sizing: border-box;
  margin: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #fff;
  color: #111;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  padding: 36px 48px 28px;
}

h1 {
  font-size: 64px;
  font-weight: 500;
  letter-spacing: -1px;
}

h1 a {
  color: var(--blue);
  text-decoration: none;
}

h1 a:hover {
  text-decoration: underline;
}

.filter-bar {
  margin-top: 10px;
  font-size: 19px;
  color: var(--blue);
}

.filter-bar button {
  font: inherit;
  color: var(--blue);
  background: none;
  border: none;
  padding: 0;
  margin-left: 12px;
  cursor: pointer;
}

.filter-bar button:hover {
  text-decoration: underline;
}

main {
  padding: 0 48px 80px;
}

.columns {
  columns: 3 320px;
  column-gap: 56px;
}

.item {
  break-inside: avoid;
  margin-bottom: 44px;
}

.item .fact-image {
  width: 100%;
  display: block;
  border: 1px solid #ddd;
  margin-bottom: 14px;
}

.item .tag {
  display: inline-block;
  font-size: 19px;
  color: var(--blue);
  text-decoration: none;
  margin-bottom: 8px;
  word-break: break-word;
}

.item .tag:hover {
  text-decoration: underline;
}

.item .text {
  font-size: 17px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.item .author {
  margin-top: 10px;
  font-size: 17px;
  color: var(--blue);
}

.item .author a {
  color: var(--blue);
  text-decoration: none;
}

.item .author a:hover {
  text-decoration: underline;
}

.item .date {
  margin-top: 6px;
  font-size: 13px;
  color: #9aa0a6;
}

/* форма */

.form-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-card input[type="text"],
.form-card textarea {
  font: inherit;
  font-size: 17px;
  color: #111;
  border: 1.5px solid var(--blue-light);
  border-radius: 4px;
  padding: 8px 12px;
  width: 100%;
  resize: vertical;
}

.form-card input::placeholder,
.form-card textarea::placeholder {
  color: #9aa0a6;
}

.form-card input[type="text"]:focus,
.form-card textarea:focus {
  outline: none;
  border-color: var(--blue);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.form-card button {
  font: inherit;
  font-size: 17px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 6px 18px;
  cursor: pointer;
  align-self: flex-start;
}

.form-card button:hover {
  background: #1e4fd6;
}

.form-card button:disabled {
  background: var(--blue-light);
  cursor: default;
}

.image-link {
  color: var(--blue);
  font-size: 16px;
  cursor: pointer;
  user-select: none;
}

.image-link:hover {
  text-decoration: underline;
}

#image-preview {
  width: 100%;
  display: block;
  border: 1px solid #ddd;
}

#image-preview[hidden] {
  display: none;
}

.form-error {
  color: #d32f2f;
  font-size: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hint {
  font-size: 13px;
  color: #9aa0a6;
  padding-left: 2px;
}

/* страница о проекте */

.about {
  max-width: 640px;
  font-size: 18px;
  line-height: 1.6;
}

.about p {
  margin-bottom: 18px;
}

.about a,
.about .about-tag {
  color: var(--blue);
  text-decoration: none;
}

.about a:hover {
  text-decoration: underline;
}

/* футер */

.footer {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  text-align: center;
  color: rgb(140, 140, 140);
  font-size: 0.8em;
  margin-top: auto;
  margin-bottom: 20px;
  width: 100%;
}

.footer .copyright {
  color: inherit;
  text-decoration: none;
}

.footer .copyright:hover {
  text-decoration: underline;
}
