@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("./assets/source-sans-3-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("./assets/source-sans-3-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --page: #f5f7fb;
  --surface: #fff;
  --table-header: #f1f4f9;
  --line: #dce3ee;
  --control-line: #a9b7cb;
  --ink: #19273e;
  --muted: #495c76;
  --accent: #2548c7;
  --accent-hover: #1b369d;
  --accent-wash: #e9efff;
  --data-ink: #18604d;
  --data-wash: #e7f3ee;
  --gutter: clamp(1rem, 4vw, 4rem);
  --font: "Source Sans 3", system-ui, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
}

::selection {
  background: var(--accent-wash);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.container {
  width: min(1400px, calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.header-content {
  display: flex;
  align-items: center;
  min-height: 4.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.375rem;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.brand-mark {
  display: grid;
  width: 2.375rem;
  height: 2.375rem;
  place-items: center;
  border-radius: 0.625rem;
  background: var(--accent);
  color: var(--surface);
}

.folder-icon {
  position: relative;
  width: 1.125rem;
  height: 0.8125rem;
  margin-top: 0.1875rem;
  border-radius: 0.125rem;
  background: currentColor;
}

.folder-icon::before {
  position: absolute;
  top: -0.1875rem;
  left: 0;
  width: 0.5rem;
  height: 0.375rem;
  border-radius: 0.125rem 0.125rem 0 0;
  background: currentColor;
  content: "";
}

.main {
  padding-block: 4.5rem 5rem;
}

.folder-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem 2rem;
}

h1, h2, p {
  margin: 0;
}

h1 {
  font-size: 3.5rem;
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.folder-intro p {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 1.25rem;
}

.collection {
  display: grid;
  justify-items: end;
  gap: 0.375rem;
}

.collection-note {
  color: var(--muted);
  font-size: 0.9375rem;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6875rem;
  min-height: 3rem;
  padding: 0.5rem 1.125rem;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--surface);
  font-weight: 650;
  text-decoration: none;
}

.download-icon {
  position: relative;
  width: 0.9375rem;
  height: 0.9375rem;
  flex: 0 0 auto;
  border-bottom: 2px solid currentColor;
  border-radius: 0.0625rem;
}

.download-icon::before {
  position: absolute;
  top: 0;
  left: calc(50% - 1px);
  width: 2px;
  height: 0.5625rem;
  background: currentColor;
  content: "";
}

.download-icon::after {
  position: absolute;
  top: 0.25rem;
  left: calc(50% - 0.21875rem);
  width: 0.4375rem;
  height: 0.4375rem;
  transform: rotate(45deg);
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  content: "";
}

.files {
  margin-top: 3.5rem;
}

.file-toolbar,
.file-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem 1rem;
}

.file-toolbar {
  min-height: 2.75rem;
  margin-bottom: 0.875rem;
  justify-content: space-between;
}

h2 {
  font-size: 1.5rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.file-count {
  color: var(--muted);
  font-size: 1rem;
}

.file-search {
  position: relative;
  width: min(17rem, 100%);
}

.file-search input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.375rem 0.75rem 0.375rem 2.375rem;
  border: 1px solid var(--control-line);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.file-search input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.search-icon {
  position: absolute;
  top: calc(50% - 0.4375rem);
  left: 0.875rem;
  width: 0.75rem;
  height: 0.75rem;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  pointer-events: none;
}

.search-icon::after {
  position: absolute;
  right: -0.3125rem;
  bottom: -0.1875rem;
  width: 0.375rem;
  height: 1.5px;
  transform: rotate(45deg);
  border-radius: 1px;
  background: var(--muted);
  content: "";
}

.table-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 0.875rem 1.25rem;
}

th {
  background: var(--table-header);
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 650;
}

td {
  border-top: 1px solid var(--line);
  color: var(--muted);
  vertical-align: middle;
}

.format-column {
  width: 15%;
}

.size-column {
  width: 12%;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.action-column {
  width: 8.75rem;
  text-align: right;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.file-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}

.file-name, .file-description {
  display: block;
}

.file-name {
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 650;
}

.file-description {
  font-size: 0.9375rem;
}

.file-icon {
  position: relative;
  display: grid;
  width: 2.625rem;
  height: 2.875rem;
  flex: 0 0 auto;
  place-items: center;
  padding-top: 0.375rem;
  border-radius: 0.375rem;
  background: var(--accent-wash);
  color: var(--accent-hover);
  font-size: 0.8125rem;
  font-weight: 700;
}

.file-icon::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 0.625rem;
  height: 0.625rem;
  border-bottom-left-radius: 0.1875rem;
  background: currentColor;
  opacity: 0.15;
  content: "";
}

.file-icon-data {
  background: var(--data-wash);
  color: var(--data-ink);
}

.file-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding-inline: 0.625rem;
  border-radius: 0.375rem;
  color: var(--accent);
  font-weight: 650;
  text-decoration: none;
}

.empty-results {
  padding-block: 2.75rem;
  text-align: center;
}

.empty-results strong {
  color: var(--ink);
}

.empty-results p {
  margin-top: 0.25rem;
}

@media (hover: hover) {
  .primary-link:hover {
    background: var(--accent-hover);
  }

  .file-link:hover {
    background: var(--accent-wash);
    text-decoration: underline;
    text-underline-offset: 0.1875rem;
  }
}

@media (max-width: 42rem) {
  .header-content {
    min-height: 4rem;
  }

  .main {
    padding-block: 2.75rem 3.5rem;
  }

  h1 {
    font-size: 2.625rem;
  }

  .folder-intro p {
    font-size: 1.125rem;
  }

  .collection {
    justify-items: start;
  }

  .files {
    margin-top: 2.5rem;
  }

  th, td {
    padding-inline: 0.75rem;
  }

  .format-column {
    display: none;
  }

  .action-column {
    width: 6.125rem;
  }
}

@media (max-width: 30rem) {
  .file-search {
    width: 100%;
  }

  .file-info {
    gap: 0.625rem;
  }

  .file-icon {
    width: 2.25rem;
    height: 2.5rem;
  }

  .size-column {
    display: none;
  }
}
