.typograph-page {
  --tp-bg: #ffffff;
  --tp-surface: #ffffff;
  --tp-control: #f5f5f5;
  --tp-border: rgba(11, 11, 12, 0.08);
  --tp-line: rgba(11, 11, 12, 0.14);
  --tp-detail: 15px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--tp-bg);
}

.typograph-page .head--compact {
  padding-bottom: 0;
}

.typograph-page .main {
  padding: 0;
}

.tp-main {
  flex: 1;
  padding: 58px 0 76px;
}

.tp-wrap {
  width: min(1760px, calc(100% - 44px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: var(--content-offset) minmax(0, 1fr);
  align-content: start;
}

.tp-wrap > * {
  grid-column: 2;
  width: 100%;
  min-width: 0;
  max-width: 1280px;
}

.tp-title {
  margin: 0;
  max-width: 980px;
  font-size: clamp(48px, 6.15vw, 104px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

.tp-lead {
  margin: 22px 0 0;
  max-width: 760px;
  font-size: clamp(22px, 2.2vw, 34px);
  line-height: 1.14;
  color: rgba(11, 11, 12, 0.68);
}

.tp-tabs {
  display: flex;
  justify-content: flex-start;
  gap: 28px;
  margin-top: 54px;
  padding: 0 0 13px;
  border-bottom: 0.5px solid var(--tp-line);
  background: transparent;
  max-width: 1280px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tp-tabs::-webkit-scrollbar {
  display: none;
}

.tp-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: var(--tp-detail);
  line-height: 1.1;
  padding: 0;
  cursor: pointer;
  border-radius: 0;
  white-space: nowrap;
  transition: color .14s ease, opacity .14s ease;
}

.tp-tab--active {
  color: var(--fg);
}

.tp-tab:not(.tp-tab--active):hover {
  color: var(--accent);
}

.tp-panel {
  margin-top: 30px;
}

.tp-panel--hidden {
  display: none;
}

.tp-boxes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.tp-box {
  position: relative;
  background: var(--tp-surface);
  border: 0.5px solid var(--tp-line);
  border-radius: 6px;
  box-shadow: none;
  min-height: 360px;
}

.tp-box-action {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.tp-box-action:hover {
  color: var(--accent);
  background: rgba(11, 11, 12, 0.04);
}

.tp-box-action--done {
  color: var(--fg);
}

.tp-textarea {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 18px;
  line-height: 1.42;
  padding: 24px 52px 24px 24px;
  resize: vertical;
  outline: none;
}

.tp-textarea--output {
  background: rgba(11, 11, 12, 0.025);
}

.tp-action-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 22px;
  margin-top: 22px;
  background: transparent;
  border-radius: 0;
  padding: 0;
  max-width: 1280px;
}

.tp-action {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.2;
  padding: 0 0 7px;
  cursor: pointer;
  border-radius: 0;
  border-bottom: 0.5px solid transparent;
  white-space: nowrap;
  transition: color .14s ease, border-color .14s ease;
}

.tp-action:hover {
  color: var(--accent);
}

.tp-action--active {
  color: var(--fg);
  border-color: var(--fg);
}

.tp-action--active:hover {
  color: var(--fg);
}

.tp-stats {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px 20px;
  font-size: 13px;
  line-height: 1.34;
  color: rgba(11, 11, 12, 0.55);
}

.tp-stats strong {
  color: var(--fg);
  font-weight: 500;
}

.tp-stats-script {
  color: var(--muted);
}

.tp-about {
  background: var(--tp-surface);
  border-top: 0.5px solid var(--tp-line);
  border-bottom: 0.5px solid var(--tp-line);
  border-radius: 0;
  box-shadow: none;
  padding: 28px 0 30px;
  max-width: 760px;
  font-size: var(--tp-detail);
  line-height: 1.46;
  color: rgba(11, 11, 12, 0.82);
}

.tp-about p {
  margin: 0 0 16px;
}

.tp-about ul {
  margin: 0 0 20px;
  padding-left: 1.2em;
}

.tp-about li + li {
  margin-top: 6px;
}

.tp-about a {
  color: inherit;
}

.tp-back {
  display: inline-block;
  margin-top: 34px;
  font-size: var(--tp-detail);
  color: var(--muted);
}

.tp-back:hover {
  color: var(--fg);
}

.foot--compact {
  margin-top: auto;
  padding: 0 0 32px;
  background: var(--tp-bg);
}

@media (max-width: 1024px) {
  .tp-wrap {
    width: min(100% - 32px, 1760px);
    display: block;
  }

  .tp-boxes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .tp-main {
    padding: 36px 0 58px;
  }

  .tp-title {
    font-size: clamp(38px, 10vw, 62px);
  }

  .tp-lead {
    margin-top: 18px;
    font-size: clamp(22px, 6vw, 30px);
    line-height: 1.16;
  }

  .tp-tabs {
    gap: 24px;
    margin-top: 38px;
  }

  .tp-boxes {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .tp-box,
  .tp-textarea {
    min-height: 280px;
  }

  .tp-textarea {
    font-size: 17px;
    padding: 20px 48px 20px 20px;
  }

  .tp-action-bar {
    gap: 18px;
  }

  .tp-action {
    text-align: left;
  }
}
