
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 400;
}
li {
  list-style-type: none;
}
button {
  outline: none;
  border: none;
  background-color: transparent;
  cursor: pointer;
}
input,
textarea {
  outline: none;
  border: none;
}

img {
  background-color: #eaeaea;
}

:root {
  --color-bg: #FFFFFF;
  --color-main: #3200E5;
  --color-title: #000000;
  --color-text: #999999;
  --color-text-link: #FFFFFF;
}

body {
  position: relative;
  min-height: 100vh;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: 1rem;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 400;
}

header > div, main, footer, .cookies {
  max-width: 640px;
  margin: 0 auto;
  padding-left: 12px;
  padding-right: 12px;
}

header {
  border-top: 1px solid var(--color-main);
}

header > div {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 6px;
  padding-top: 20px;
  padding-bottom: 20px;
  font-size: 12px;
  text-align: end;
}

header svg path {
  fill: var(--color-main);
}

main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-x: hidden;
}

h1 {
  color: var(--color-title);
  font-weight: 600;
}

.mob h1 {
  font-size: 0.8rem;
  line-height: 2ch;
}
.mob h2,
.mob h3 {
  font-size: 0.8rem;
  line-height: 2ch;
}
.mob p {
  font-size: 11px;
}
.mob ul {
  font-size: 11px;
}
.mob li {
  font-size: 11px;
}
.mob ul li {
  font-size: 11px;
}
.mob table {
  font-size: 11px;
}

@media (max-width: 640px) {
  .article_page h1 {
    font-size: 0.8rem;
    line-height: 2ch;
  }
  .article_page h2,
  .article_page h3 {
    font-size: 0.8rem;
    line-height: 2ch;
  }
  .article_page p {
    font-size: 11px;
  }
  .article_page ul {
    font-size: 11px;
  }
  .article_page li {
    font-size: 11px;
  }
  .article_page ul li {
    font-size: 11px;
  }
  .article_page table {
    font-size: 11px;
  }

  .mob .article_desc {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .mob h1, .mob h2, .mob h3, .mob h4, .mob p, .mob img, .mob ul, .mob li, .mob table  {
    opacity: 0;
    animation: fadeIn 1s ease-in forwards;
  }
  .mob h1 {
    animation-delay: 0s;
  }
  .mob p {
    animation-delay: 0.1s;
  }
  .mob img {
    animation-delay: 0.2s;
  }
  .mob h2 {
    animation-delay: 0.2s;
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .article_page.mob p:first-of-type {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-bottom: 0px;
  }
}

.article_page {
  height: 100%;
}

.article_page p {
  margin-bottom: 1rem;
}
.article_page h2,
.article_page h3 {
  margin-bottom: 1rem;
}
.article_page img {
  width: 100%;
  max-width: max-content;
  object-fit: contain;
  max-height: 550px;
  margin: 0 auto 15px auto;
}
.article_page ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}
.article_page ul li {
  line-height: 2.5ch;
}
.article_page ul,
.article_page ol {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}
.article_page dt {
  margin-bottom: 6px;
}
.article_page dd {
  margin-bottom: 15px;
}
.article_page table {
  position: relative;
  display: block;
  overflow-x: auto;
  margin-bottom: 15px;
}
.article_page table thead,
.article_page table tbody {
  display: inline-flex;
  flex-direction: column;
}
.article_page table tr {
  display: inline-flex;
  gap: 10px;
}
.article_page table th,
.article_page table td {
  display: inline-block;
  width: 200px;
  padding-bottom: 10px;
}
.article_page table th:not(:last-child),
.article_page table td:not(:last-child) {
  border-right: 1px solid #000000;
  padding-right: 10px;
}

.links_wrapper {
  display: flex;
  flex-direction: column;
}
.links_wrapper ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.links_wrapper p {
  color: #666666;
  font-size: 12px;
}
.links_wrapper li {
  position: relative;
  background-color: var(--color-main);
  border-radius: 10px;
  padding: 16px 20px;
}
.links_wrapper li::before,
.links_wrapper li::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 10px;
  height: 2px;
  background-color: var(--color-text-link);
}
.links_wrapper li::before {
  transform: translate(0, calc(-50% - 3px)) rotate(45deg);
}
.links_wrapper li::after {
  transform: translate(0, calc(-50% + 3px)) rotate(-45deg);
}
.links_wrapper li a {
  display: block;
  max-width: 94%;
  color: var(--color-text-link);
}

.cookies {
  width: 100%;
  max-width: 100%;
  --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);

  position: fixed;
  bottom: 0;
  box-shadow: var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: 12px;
  text-align: center;
  padding: 12px;
  z-index: 100;
  border-top: 1px solid var(--color-text);
  margin-top: 16px;

  &[data-visible='false'] {
    display: none;
  }

  a, span {
    text-decoration: underline;
    cursor: pointer;
  }
}

.search_result {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.search_result .not_found {
  width: 100%;
  text-align: center;
}

.search_result a {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search_result a .title {
  font-size: 16px;
}
.search_result a .link , .search_result a .snippet {
  font-size: 14px;
}

.search_page_form {
  display: flex;
  gap: 4px;
  height: 40px;
}

.search_page_form input {
  width: 100%;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-link);
  background-color: var(--color-main);
  background-clip: padding-box;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
  height: 100%;
  vertical-align: top;
  border: none;
  padding-left: 1em;
  outline: none;
  border-radius: 10px;
}
.search_page_form input::placeholder {
  color: inherit;
  font-size: inherit;
  opacity: .8;
}

.search_page_form button {
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background-color: var(--color-main);
  border-radius: 10px;
  color: var(--color-text-link);
}

.search_page_form button svg {
  width: 20px;
  height: 20px;
}
.search_page_form button svg path {
  fill: var(--color-text-link);
}

.loader_wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 100px 0;
}

.loader {
  border: 3px solid var(--color-main);
  border-top: 3px solid transparent;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


footer {
  width: 100%;
  align-self: end;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  font-size: 1rem;
  border-top: 1px solid #444444;
}
footer a {
  text-decoration: underline;
}
