:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17202a;
  background: #f6f7f9;
}

body {
  margin: 0;
}

header {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 20px 28px;
  background: #ffffff;
  border-bottom: 1px solid #d9dee7;
}

.home-link {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  color: #1e4f68;
  background: #eef2f5;
  border-radius: 6px;
}

.home-link:hover {
  background: #dce8ee;
}

.home-link svg,
.clear-search svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  white-space: nowrap;
}

form {
  display: flex;
  gap: 8px;
  margin-left: auto;
  width: min(560px, 50vw);
}

.search-field {
  position: relative;
  flex: 1;
  min-width: 0;
}

input,
button {
  font: inherit;
}

input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #bac3d0;
  border-radius: 6px;
  box-sizing: border-box;
}

.search-field input {
  padding-right: 42px;
}

.clear-search {
  position: absolute;
  top: 50%;
  right: 6px;
  display: none;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #526070;
  transform: translateY(-50%);
  border-radius: 6px;
}

.clear-search:hover {
  color: #17202a;
  background: #edf1f4;
}

.search-field input:not(:placeholder-shown) + .clear-search {
  display: grid;
}

button {
  padding: 10px 14px;
  color: #ffffff;
  background: #1f6f8b;
  border: 0;
  border-radius: 6px;
}

main {
  min-height: calc(100vh - 77px);
}

.folders a {
  display: block;
  padding: 8px 10px;
  color: #1e4f68;
  text-decoration: none;
  border-radius: 6px;
}

.folders a:hover {
  background: #dce8ee;
}

section {
  padding: 22px 28px 48px;
  max-width: 1280px;
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  color: #526070;
}

.breadcrumb a {
  color: #1e4f68;
  text-decoration: none;
}

.folders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.folder {
  min-height: 58px;
  background: #ffffff;
  border: 1px solid #d9dee7;
}

.folder strong,
.folder span {
  display: block;
}

.folder span {
  margin-top: 4px;
  color: #6c7784;
  font-size: 13px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  color: #526070;
}

.results.list {
  display: grid;
  gap: 10px;
}

.results.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.doc {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #d9dee7;
  border-radius: 8px;
}

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

.thumb {
  display: grid;
  place-items: center;
  width: 86px;
  height: 112px;
  overflow: hidden;
  color: #607080;
  background: #edf1f4;
  border-radius: 6px;
  text-decoration: none;
}

.grid .thumb {
  width: 100%;
  height: 160px;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-thumb {
  font-size: 14px;
  font-weight: 700;
}

h2 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.25;
}

h2 a {
  color: #17202a;
  text-decoration: none;
}

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

p {
  margin: 4px 0;
}

.path {
  overflow-wrap: anywhere;
  color: #6c7784;
  font-size: 13px;
}

@media (max-width: 760px) {
  header {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 12px;
  }

  form {
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
  }

  main {
    grid-template-columns: 1fr;
  }
}
