* {
  box-sizing: border-box;
}

@font-face {
  font-family: 'AktivGroteskExMd';
  src: url('./fonts/AktivGroteskEx_Md.ttf') format('truetype');
  font-style: normal;
  font-display: swap;
}

:root {
  --font-head: 'AktivGroteskExMd', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'ABeeZee', Arial, sans-serif;
  --font-footer: 'Poppins', 'ABeeZee', Arial, sans-serif;
  --text-black: #000000;
  --text-gray: #737373;
  --line: #e2e2e2;
  --panel: #f3f3f3;
  --page-bg: #ffffff;
  --footer-bg: #000000;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  color: var(--text-black);
}

body {
  font-family: var(--font-body);
}

body.modal-open {
  overflow: hidden;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
}

.topbar__inner {
  max-width: 1359px;
  margin: 0 auto;
  min-height: 72px;
  padding: 20px 48px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand-mark {
  width: 109px;
  height: 24px;
  display: flex;
  align-items: center;
}

.brand-mark__bars {
  width: 100%;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, #000 0 14%, transparent 14% 18%, #000 18% 22%, transparent 22% 26%, #000 26% 44%, transparent 44% 48%, #000 48% 52%, transparent 52% 58%, #000 58% 78%, transparent 78% 82%, #000 82% 100%);
}

.topbar__blank {
  flex: 1;
  min-height: 32px;
}

.footer {
  font-family: var(--font-body);
}

.icon-btn {
  position: relative;
  width: 32px;
  height: 32px;
  border: 0;
  outline: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:focus,
.icon-btn:focus-visible,
.download-link:focus,
.download-link:focus-visible,
.download-sheet__item-link:focus,
.download-sheet__item-link:focus-visible,
.download-sheet__action:focus,
.download-sheet__action:focus-visible {
  outline: none;
  box-shadow: none;
}

.icon-btn img {
  width: 20px;
  height: 20px;
}

.icon-btn--badge .icon-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #00f661;
  color: #000;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}

.topbar__line {
  height: 1px;
  background: var(--line);
}

.topbar__active {
  width: 99px;
  height: 3px;
  background: #000;
  margin-left: calc((100vw - min(1359px, 100vw)) / 2 + 582px);
  max-width: 99px;
}

.content {
  width: min(1359px, calc(100% - 32px));
  margin: 0 auto;
  padding: 61px 0 120px;
  flex: 1;
}

.hero__title {
  margin: 0 0 61px;
  font-family: var(--font-head);
  font-size: 40px;
  font-weight: 500;
  line-height: 56px;
  text-align: center;
}

.opensource-card {
  width: min(1170px, 100%);
  margin: 0 auto;
  border-radius: 6px;
  overflow: hidden;
}

.row-grid {
  display: grid;
  grid-template-columns: 3.3fr 1.75fr 1.1fr 1.45fr 1.2fr;
  column-gap: 28px;
  align-items: center;
  padding-left: 48px;
  padding-right: 43px;
}

.row-grid--header {
  min-height: 60px;
  background: var(--panel);
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--text-black);
}

.row-grid--item {
  min-height: 60px;
  background: transparent;
  border-top: 1px solid var(--line);
}

.cell {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--text-gray);
  min-width: 0;
  word-break: break-word;
}

.cell--project {
  white-space: nowrap;
}

.cell--description {
  max-width: 100%;
}

.cell--license {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cell--action {
  display: flex;
  justify-content: flex-start;
}

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 115px;
  height: 35px;
  padding: 0;
  border: 2px solid #000;
  border-radius: 4px;
  color: #000;
  background: transparent;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 400;
  line-height: 35px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.download-link:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}

.view-all-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: #000;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 400;
  line-height: 21px;
  text-decoration: underline;
  cursor: pointer;
}

.view-all-link:hover {
  color: #64FF00;
}

.license-modal,
.download-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}

.download-modal {
  z-index: 110;
}

.license-modal.is-open,
.download-modal.is-open {
  display: block;
}

.license-modal__backdrop,
.download-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.license-modal__dialog {
  position: relative;
  width: min(720px, calc(100vw - 32px));
  height: min(78vh, 760px);
  margin: 80px auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}

.download-modal__dialog {
  position: relative;
  width: 773px;
  max-width: calc(100vw - 32px);
  margin: 72px auto;
  background: transparent;
}

.download-modal__dialog:focus {
  outline: none;
}

.license-modal__close,
.download-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 1;
}

.download-modal__close {
  top: 34px;
  right: 26px;
  width: 45px;
  height: 45px;
}

.license-modal__close-icon,
.download-modal__close-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

.download-modal__close-icon {
  width: 24px;
  height: 24px;
}

.license-modal__close-icon::before,
.license-modal__close-icon::after,
.download-modal__close-icon::before,
.download-modal__close-icon::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 0;
  width: 18px;
  height: 1.5px;
  background: #111111;
}

.download-modal__close-icon::before,
.download-modal__close-icon::after {
  top: 11px;
  width: 24px;
  height: 2px;
  background: #000;
}

.license-modal__close-icon::before,
.download-modal__close-icon::before {
  transform: rotate(45deg);
}

.license-modal__close-icon::after,
.download-modal__close-icon::after {
  transform: rotate(-45deg);
}

.license-modal__content {
  height: 100%;
  padding: 72px 24px 24px;
  overflow-y: auto;
  color: #000;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.modal-title {
  margin: 0 0 20px;
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 500;
  line-height: 36px;
}

#licenseContent {
  white-space: pre-wrap;
}

.download-sheet {
  position: relative;
  width: 773px;
  max-width: 100%;
  min-height: 503px;
  padding: 34px 98px 60px 99px;
  border-radius: 8px;
  background: #fff;
}

.download-sheet__title {
  margin: 0;
  color: #000;
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 500;
  line-height: 32px;
}

.download-sheet__table {
  margin-top: 32px;
}

.download-sheet__rows {
  margin-top: 10px;
  max-height: 248px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
}

.download-sheet__rows::-webkit-scrollbar {
  width: 6px;
}

.download-sheet__rows::-webkit-scrollbar-thumb {
  background: #b2b2b2;
  border-radius: 999px;
}

.download-sheet__rows::-webkit-scrollbar-track {
  background: transparent;
}

.download-sheet__head,
.download-sheet__row {
  display: grid;
  grid-template-columns: 265px 197px 81px;
  align-items: center;
}

.download-sheet__head {
  width: 576px;
  height: 49px;
  padding: 0;
  border-radius: 6px;
  background: #f3f3f3;
}

.download-sheet__head-cell,
.download-sheet__cell {
  color: #000;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.download-sheet__head-cell:nth-child(1),
.download-sheet__cell--name {
  padding-left: 0;
  text-align: center;
}

.download-sheet__head-cell:nth-child(2),
.download-sheet__cell--size {
  padding-left: 0;
  text-align: center;
}

.download-sheet__head-cell:nth-child(3),
.download-sheet__cell--action {
  padding-left: 0;
  text-align: center;
  width:91px;
  height:20px;
  border-radius: 4px;
}

.download-sheet__row {
  position: relative;
  min-height: 55px;
}

.download-sheet__row::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 576px;
  height: 1px;
  background: #e2e2e2;
  border:1px;
}

.download-sheet__row:last-child::after {
  display: none;
}

.download-sheet__cell {
  color: #000;
}

.download-sheet__cell--name {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
  overflow-wrap: anywhere;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-right:0px;
}

.download-sheet__cell--size {
  color: #000;
}

.download-sheet__cell--action {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.download-sheet__item-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 115px;
  height: 30px;
  border: 2px solid #000;
  border-radius: 4px;
  background: transparent;
  color: #000;
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 400;
  line-height: 35px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.download-sheet__item-link:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}

.footer {
  background: var(--footer-bg);
  color: #fff;
  margin-top: auto;
}

.footer__inner {
  max-width: 1359px;
  margin: 0 auto;
  min-height: 96px;
  padding: 32px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__inner--blank {
  min-height: 96px;
}

@media (max-width: 1100px) {
  .topbar__inner,
  .footer__inner,
  .content {
    width: calc(100% - 32px);
    padding-left: 0;
    padding-right: 0;
  }

  .topbar__active {
    margin-left: 16px;
  }

  .opensource-card {
    width: 100%;
  }

  .row-grid {
    grid-template-columns: 2.8fr 1.5fr 1fr 1.25fr 1fr;
    column-gap: 16px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .license-modal__dialog {
    width: min(680px, calc(100vw - 24px));
  }

  .download-modal__dialog {
    width: min(773px, calc(100vw - 24px));
  }

  .download-sheet {
    width: 100%;
    padding: 32px 24px 24px;
  }

  .download-sheet__table {
    overflow-x: auto;
  }

  .download-sheet__head,
  .download-sheet__row {
    min-width: 576px;
  }
}

@media (max-width: 768px) {
  .topbar__inner {
    padding: 16px 0;
    flex-wrap: wrap;
  }

  .topbar__blank {
    order: 3;
    flex-basis: 100%;
    min-height: 8px;
  }

  .content {
    padding-top: 36px;
    padding-bottom: 80px;
  }

  .hero__title {
    margin-bottom: 32px;
    font-size: 32px;
    line-height: 40px;
  }

  .opensource-card {
    background: transparent;
  }

  .row-grid--header {
    display: none;
  }

  .opensource-card__body {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .row-grid--item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: auto;
    padding: 20px;
    border-top: 0;
    border-radius: 12px;
    background: var(--panel);
  }

  .cell--project {
    white-space: normal;
  }

  .cell::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: #000;
    font-size: 12px;
    line-height: 16px;
  }

  .cell--action {
    margin-top: 6px;
  }

  .download-link {
    min-width: 100%;
    min-height: 36px;
    font-size: 12px;
  }

  .license-modal__dialog,
  .download-modal__dialog {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 32px);
    margin: 16px auto;
    border-radius: 10px;
  }

  .license-modal__content {
    padding: 72px 20px 24px;
  }

  .license-modal__close {
    top: 14px;
    right: 14px;
  }

  .download-modal__close {
    top: 18px;
    right: 18px;
  }

  .download-sheet {
    min-height: auto;
    padding: 72px 16px 20px;
  }

  .download-sheet__title {
    font-size: 22px;
    line-height: 30px;
  }

  .download-sheet__head,
  .download-sheet__row {
    min-width: 540px;
    grid-template-columns: 240px 150px 134px;
  }

  .download-sheet__head-cell:nth-child(1),
  .download-sheet__cell--name {
    padding-left: 20px;
  }

  .download-sheet__cell--name {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .footer__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
}
