/* MacAppTorrent — catalog chrome in Karla, long reading in the system sans. */

@font-face {
  font-family: "Karla";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/karla-400.woff2") format("woff2");
}

@font-face {
  font-family: "Karla";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/karla-700.woff2") format("woff2");
}

@font-face {
  font-family: "Karla";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/karla-400-italic.woff2") format("woff2");
}

:root {
  --ma-paper: #f9f9fb;
  --ma-ink: #202124;
  --ma-link: #7b3fa0;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ma-paper);
  color: var(--ma-ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea {
  font: inherit;
}

h1, h2, h3,
.ma-button,
.ma-nav__link,
.ma-card__title,
.ma-header__brand,
.ma-tabs__tab,
.ma-account__tabs a,
.ma-rotator__title,
.ma-form label,
.ma-sideblock h2 {
  font-family: Karla, system-ui, sans-serif;
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

h1 { font-size: 1.85rem; margin: 0 0 10px; }
h2 { font-size: 1.35rem; margin: 0 0 8px; }
h3 { font-size: 1.12rem; margin: 0 0 6px; }

p { margin: 0 0 0.8em; }

a:link,
a:visited {
  color: var(--ma-link);
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--ma-link);
  outline-offset: 2px;
}

/* focus ring stays for keyboard, not a leftover mouse halo */

.ma-skip {
  position: absolute;
  left: 8px;
  top: -48px;
  background: #ffffff;
  color: var(--ma-link);
  padding: 6px 10px;
  z-index: 60;
}

.ma-skip:focus {
  top: 8px;
}

.ma-wrap {
  width: min(1180px, calc(100% - 28px));
  max-width: 100%;
  margin-inline: auto;
  min-width: 0;
}

/* header */

.ma-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ma-paper);
  border-bottom: 1px solid #e0e0e0;
}

/* safari: sticky bar paints a hair late on the first scroll */

.ma-header__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "brand user menu" "slogan slogan slogan";
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
  padding: 10px 0 8px;
}

a.ma-header__brand,
a.ma-header__brand:visited {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--ma-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
}

a.ma-header__brand:hover {
  color: var(--ma-link);
}

.ma-header__mark {
  width: 40px;
  height: 40px;
  flex: none;
}

.ma-header__name {
  overflow-wrap: normal;
}

.ma-header__slogan {
  grid-area: slogan;
  margin: 0;
  color: #555555;
  font-family: Karla, system-ui, sans-serif;
  font-style: italic;
  font-weight: 400;
  font-size: 0.92rem;
}

.ma-user {
  grid-area: user;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.ma-header__menu {
  grid-area: menu;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--ma-link);
  background: #ffffff;
  color: var(--ma-link);
  font-family: Karla, system-ui, sans-serif;
  font-weight: 700;
  padding: 6px 8px;
  cursor: pointer;
}

.ma-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
  list-style: none;
  margin: 0;
  padding: 0 0 8px;
}

.ma-nav__link {
  display: inline-block;
  padding: 6px 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}

.ma-nav__link[aria-current="page"] {
  color: var(--ma-link);
  box-shadow: inset 0 -2px 0 var(--ma-link);
}

.ma-icon {
  width: 18px;
  height: 18px;
  max-width: none;
  display: inline-block;
  vertical-align: -3px;
}

.ma-bell {
  position: relative;
}

.ma-bell__button {
  position: relative;
  border: 1px solid #d6d6d6;
  background: #ffffff;
  padding: 6px;
  cursor: pointer;
}

.ma-bell__count {
  position: absolute;
  top: -5px;
  right: -7px;
  background: var(--ma-link);
  color: #ffffff;
  border-radius: 8px;
  font-family: Karla, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 2px 4px;
}

.ma-bell__drop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: min(320px, 86vw);
  background: #ffffff;
  border: 1px solid #d6d6d6;
  padding: 8px 8px 4px;
  z-index: 25;
}

.ma-bell__drop ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ma-bell__drop li {
  padding: 7px 6px;
  border-bottom: 1px solid #eeeeee;
}

.ma-bell__drop li.is-unread {
  background: #f4f4f4;
}

.ma-bell__drop time {
  display: block;
  color: #6a6a6a;
  font-size: 0.8rem;
}

.ma-bell__all {
  display: block;
  padding: 8px 6px 6px;
  font-family: Karla, system-ui, sans-serif;
  font-weight: 700;
}

a.ma-user__who,
a.ma-user__who:visited {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ma-ink);
  text-decoration: none;
  font-weight: 700;
}

.ma-user__who:hover .ma-user__name {
  color: var(--ma-link);
}

.ma-user__avatar,
.ma-account__mark,
.ma-author__mark,
.ma-byline__mark,
.ma-comment__avatar {
  display: grid;
  place-items: center;
  background: #eeeeee;
  color: var(--ma-ink);
  font-family: Karla, system-ui, sans-serif;
  font-weight: 700;
}

.ma-user__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 12px;
}

.ma-bell__drop[hidden],
.ma-form__error[hidden],
.ma-empty[hidden] {
  display: none !important;
}

/* frame: sidebar on the left from 960px, stacked under that */

.ma-frame {
  display: grid;
  gap: 26px;
  margin-top: 20px;
  align-items: start;
}

.ma-frame__main,
.ma-frame__aside {
  min-width: 0;
}

.ma-sideblock {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e6e6e6;
}

.ma-sideblock h2 {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #3a3a3a;
  margin: 0 0 8px;
}

.ma-sideblock p:last-child {
  margin-bottom: 0;
}

.ma-byline {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.ma-byline__mark {
  width: 42px;
  height: 42px;
  margin: 0;
  font-size: 14px;
}

.ma-byline__text {
  margin: 0;
  font-size: 0.92rem;
}

.ma-sidelist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ma-sidelist li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
}

.ma-sidelist a[aria-current="page"] {
  font-weight: 700;
  text-decoration: none;
}

.ma-sidelist span {
  color: #6a6a6a;
  font-variant-numeric: tabular-nums;
}

.ma-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0;
}

.ma-tags a {
  text-decoration: none;
  line-height: 1.3;
}

.ma-tag--small { font-size: 0.78rem; }
.ma-tag--medium { font-size: 0.92rem; }
.ma-tag--large { font-size: 1.05rem; }
.ma-tag--xlarge { font-size: 1.18rem; }

.ma-facts {
  margin: 0;
}

.ma-facts div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid #e6e6e6;
  font-size: 0.92rem;
}

.ma-facts dt {
  color: #3a3a3a;
  font-weight: 700;
}

.ma-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* buttons */

.ma-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  font-family: Karla, system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  white-space: normal;
  padding: 8px 12px;
  border-radius: 3px;
  border: 1px solid var(--ma-link);
  cursor: pointer;
  background: #ffffff;
  color: var(--ma-link);
}

a.ma-button--primary,
a.ma-button--primary:visited,
button.ma-button--primary {
  background: var(--ma-link);
  color: #ffffff;
}

.ma-button--primary:hover {
  filter: brightness(0.93);
}

.ma-button--quiet:hover,
.ma-favorite:hover {
  background: #f4f4f4;
}

.ma-favorite.is-in {
  background: #f4f4f4;
}

/* cards with a cover plate */

.ma-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 13px;
}

.ma-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  background: #ffffff;
  border: 1px solid #d6d6d6;
  border-radius: 3px;
  color: var(--ma-ink);
  text-decoration: none;
}

.ma-card:hover .ma-card__title {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.ma-card__cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 112px;
  background: #f4f4f4;
  border-bottom: 1px solid #e6e6e6;
}

.ma-card__icon {
  width: 56px;
  height: 56px;
  max-width: none;
}

.ma-card__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ffffff;
  border: 1px solid #d6d6d6;
  font-family: Karla, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 6px;
  color: var(--ma-ink);
}

.ma-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 10px 12px 12px;
}

.ma-card__title {
  display: block;
  color: var(--ma-link);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ma-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
  color: #555555;
  font-size: 12px;
}

.ma-card__version {
  overflow-wrap: anywhere;
}

.ma-card__size {
  display: inline-block;
  background: #eeeeee;
  border-radius: 2px;
  padding: 1px 6px;
}

/* home */

.ma-intro {
  max-width: 68ch;
}

.ma-intro ul {
  margin: 0 0 0.6em;
  padding-left: 1.2rem;
}

.ma-rotator {
  margin: 22px 0 8px;
}

.ma-rotator__box {
  position: relative;
}

.ma-rotator__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.ma-rotator__slide {
  display: none;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 148px;
  background: #ffffff;
  border: 1px solid #d6d6d6;
  padding: 14px;
}

.ma-rotator__icon {
  width: 64px;
  height: 64px;
  max-width: none;
}

.ma-rotator__kicker {
  margin: 0 0 2px;
  font-family: Karla, system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6a6a6a;
}

.ma-rotator__title {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.ma-rotator__text {
  margin: 0 0 10px;
}

#ma-pick-1:checked ~ .ma-rotator__slides .ma-rotator__slide:nth-child(1),
#ma-pick-2:checked ~ .ma-rotator__slides .ma-rotator__slide:nth-child(2),
#ma-pick-3:checked ~ .ma-rotator__slides .ma-rotator__slide:nth-child(3) {
  display: grid;
}

.ma-rotator__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ma-rotator__controls label {
  border: 1px solid var(--ma-link);
  color: var(--ma-link);
  background: #ffffff;
  padding: 4px 10px;
  cursor: pointer;
  font-family: Karla, system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
}

#ma-pick-1:checked ~ .ma-rotator__controls label[for="ma-pick-1"],
#ma-pick-2:checked ~ .ma-rotator__controls label[for="ma-pick-2"],
#ma-pick-3:checked ~ .ma-rotator__controls label[for="ma-pick-3"] {
  background: var(--ma-link);
  color: #ffffff;
}

#ma-pick-1:focus-visible ~ .ma-rotator__controls label[for="ma-pick-1"],
#ma-pick-2:focus-visible ~ .ma-rotator__controls label[for="ma-pick-2"],
#ma-pick-3:focus-visible ~ .ma-rotator__controls label[for="ma-pick-3"] {
  outline: 2px solid var(--ma-link);
  outline-offset: 2px;
}

.ma-section {
  margin: 28px 0;
}

.ma-section__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 12px;
  margin-bottom: 12px;
}

.ma-section__head h2 {
  margin: 0;
}

/* crumbs, program, gallery */

.ma-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  font-size: 0.9rem;
}

.ma-crumbs li:not(:last-child)::after {
  content: "›";
  color: #6a6a6a;
  margin: 0 6px;
}

.ma-program__head {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.ma-program__icon {
  width: 64px;
  height: 64px;
  max-width: none;
}

.ma-program__kicker {
  display: inline-block;
  margin-bottom: 2px;
  font-family: Karla, system-ui, sans-serif;
  font-weight: 700;
  text-decoration: none;
}

.ma-program__updated {
  margin: 4px 0 0;
  color: #555555;
  font-size: 0.92rem;
}

.ma-program__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ma-gallery__stage {
  background: #f4f4f4;
  border: 1px solid #d6d6d6;
  padding: 8px;
}

.ma-gallery__large {
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
}

.ma-gallery__caption {
  margin: 8px 2px 0;
  color: #3a3a3a;
  font-size: 0.92rem;
}

.ma-gallery__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.ma-gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.ma-gallery__thumb {
  display: block;
  padding: 0;
  border: 2px solid transparent;
  background: #eeeeee;
  line-height: 0;
}

.ma-gallery__thumb.is-on {
  border-color: var(--ma-link);
}

.ma-gallery__thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.ma-tabs {
  margin-top: 18px;
}

.ma-tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid #d6d6d6;
}

.ma-tabs__tab {
  font-weight: 700;
  font-size: 1rem;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--ma-link);
  padding: 8px 12px;
  margin-bottom: -1px;
  cursor: pointer;
}

.ma-tabs__tab[aria-selected="true"] {
  color: var(--ma-ink);
  border-bottom-color: var(--ma-link);
}

.ma-tabs__fallback {
  display: none;
  font-family: Karla, system-ui, sans-serif;
  font-weight: 700;
  margin: 1.1rem 0 0.35rem;
}

/* without the ready class the three notes stay in reading order */
html:not(.ma-ready) .ma-tabs__panel[hidden] {
  display: block !important;
}

html.ma-ready .ma-tabs__panel[hidden] {
  display: none !important;
}

html:not(.ma-ready) .ma-tabs__fallback {
  display: block;
}

.ma-tabs__panel {
  padding-top: 14px;
}

.ma-prose {
  max-width: 68ch;
  font-size: 1.05rem;
  line-height: 1.65;
}

.ma-prose h2 {
  font-size: 1.42rem;
  margin: 1.45em 0 0.4em;
  scroll-margin-top: 84px;
}

.ma-prose h3 {
  font-size: 1.12rem;
  margin: 1.15em 0 0.3em;
}

.ma-prose p,
.ma-prose ul,
.ma-prose ol,
.ma-prose table {
  margin: 0 0 0.9em;
}

.ma-prose ul,
.ma-prose ol {
  padding-left: 1.25rem;
}

.ma-prose li {
  margin: 0 0 0.28em;
}

.ma-prose table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.95rem;
}

.ma-prose th,
.ma-prose td,
.ma-glance th,
.ma-glance td {
  text-align: left;
  vertical-align: top;
  padding: 6px 8px;
  border-bottom: 1px solid #e0e0e0;
  overflow-wrap: anywhere;
}

.ma-prose th,
.ma-glance th {
  font-family: Karla, system-ui, sans-serif;
  font-weight: 700;
}

.ma-prose code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: #f4f4f4;
  padding: 0 4px;
}

.ma-toc {
  margin: 0 0 1.3rem;
  padding: 2px 0 2px 14px;
  border-left: 3px solid #d6d6d6;
  font-size: 0.95rem;
}

.ma-toc__title {
  margin: 0 0 4px;
  font-family: Karla, system-ui, sans-serif;
  font-weight: 700;
}

.ma-toc ol {
  margin: 0;
  padding-left: 1.15rem;
}

.ma-glance {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.95rem;
  margin: 0 0 1em;
}

.ma-glance caption {
  caption-side: top;
  text-align: left;
  font-family: Karla, system-ui, sans-serif;
  font-weight: 700;
  margin-bottom: 6px;
}

.ma-faq details {
  border-top: 1px solid #e0e0e0;
  padding: 8px 0;
}

.ma-faq summary {
  cursor: pointer;
  font-family: Karla, system-ui, sans-serif;
  font-weight: 700;
}

.ma-faq details p {
  margin: 8px 0 0;
}

.ma-author {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  margin: 22px 0;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
}

.ma-author__mark {
  width: 52px;
  height: 52px;
  margin: 0;
  font-size: 16px;
}

.ma-author__title {
  font-size: 1.05rem;
  margin: 0 0 4px;
}

.ma-empty {
  margin: 0 0 12px;
  padding: 12px;
  background: #f4f4f4;
  border: 1px dashed #b0b0b0;
}

/* comments */

.ma-comments {
  margin-top: 8px;
}

.ma-comments__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ma-comments__count {
  color: #555555;
  font-weight: 400;
}

.ma-comments__sort {
  display: flex;
  gap: 6px;
}

.ma-comments__sort button {
  font-family: Karla, system-ui, sans-serif;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid #d6d6d6;
  color: var(--ma-link);
  padding: 4px 8px;
  cursor: pointer;
}

.ma-comments__sort button.is-on {
  background: var(--ma-link);
  border-color: var(--ma-link);
  color: #ffffff;
}

.ma-commentform,
.ma-reply {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.ma-commentform textarea,
.ma-reply textarea,
.ma-form input[type="text"],
.ma-form input[type="email"],
.ma-form input[type="password"],
.ma-form input[type="search"],
.ma-form textarea,
.ma-search input {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
  color: var(--ma-ink);
  background: #ffffff;
  border: 1px solid #b0b0b0;
  border-radius: 3px;
  padding: 8px 10px;
  width: 100%;
  max-width: 100%;
}

.ma-commentform textarea,
.ma-reply textarea {
  min-height: 96px;
}

.ma-form__hint {
  margin: 0;
  color: #555555;
  font-size: 0.9rem;
}

.ma-form__error {
  margin: 0;
  padding: 8px 10px;
  background: #eeeeee;
  border-left: 3px solid #3a3a3a;
}

.ma-form__trap {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.ma-commentlist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ma-comment {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid #e6e6e6;
}

.ma-comment.is-held {
  opacity: 0.55;
}

.ma-comment__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 13px;
}

.ma-comment__name {
  font-family: Karla, system-ui, sans-serif;
  font-weight: 700;
}

.ma-comment time {
  color: #6a6a6a;
  font-size: 0.85rem;
  margin-left: 6px;
}

.ma-comment__badge {
  display: inline-block;
  margin-left: 6px;
  border: 1px solid #b0b0b0;
  font-size: 12px;
  padding: 0 5px;
  vertical-align: 1px;
}

.ma-comment__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.ma-comment__like,
.ma-comment__reply {
  font-family: Karla, system-ui, sans-serif;
  background: transparent;
  border: 0;
  color: var(--ma-link);
  padding: 0;
  cursor: pointer;
}

.ma-comment__like.is-on {
  font-weight: 700;
}

.ma-replies {
  margin-top: 4px;
  padding-left: 8px;
  border-left: 2px solid #e0e0e0;
}

.ma-invite {
  padding: 10px 0;
}

/* forms, account, errors */

.ma-form {
  display: grid;
  gap: 12px;
  max-width: 28rem;
}

.ma-form label {
  display: grid;
  gap: 4px;
  font-weight: 700;
  color: var(--ma-ink);
}

.ma-form label.ma-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}

.ma-form__saved {
  margin: 0;
  padding: 8px 10px;
  background: #f4f4f4;
  border: 1px solid #d6d6d6;
}

.ma-form__links {
  margin: 0;
}

.ma-account__who {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.ma-account__mark {
  width: 52px;
  height: 52px;
  margin: 0;
  border-radius: 50%;
  font-size: 16px;
}

.ma-account__signed {
  margin: 0;
  color: #555555;
}

.ma-account__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 16px;
  border-bottom: 1px solid #d6d6d6;
}

.ma-account__tabs a {
  text-decoration: none;
  font-weight: 700;
  padding: 8px 10px;
  margin-bottom: -1px;
}

.ma-account__tabs a[aria-current="page"] {
  border-bottom: 2px solid var(--ma-link);
}

.ma-notes {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ma-notes li {
  padding: 10px 8px;
  border-bottom: 1px solid #e6e6e6;
}

.ma-notes li.is-unread {
  background: #f4f4f4;
}

.ma-notes time {
  display: block;
  color: #6a6a6a;
  font-size: 0.85rem;
}

.ma-mine {
  padding: 10px 0;
  border-bottom: 1px solid #e6e6e6;
}

.ma-mine h2 {
  font-size: 1.05rem;
}

.ma-mine__badge {
  display: inline-block;
  margin-left: 6px;
  border: 1px solid #b0b0b0;
  font-family: Karla, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 1px 6px;
  vertical-align: 2px;
}

.ma-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.ma-pager a {
  text-decoration: none;
  border: 1px solid #d6d6d6;
  background: #ffffff;
  padding: 4px 9px;
}

a.ma-pager__current,
a.ma-pager__current:visited {
  background: var(--ma-link);
  border-color: var(--ma-link);
  color: #ffffff;
}

.ma-search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin: 12px 0 16px;
  max-width: 36rem;
}

.ma-search label {
  flex: 1 1 180px;
  display: grid;
  gap: 4px;
  font-family: Karla, system-ui, sans-serif;
  font-weight: 700;
}

.ma-search__legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ma-popular {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

/* dialogs */

.ma-dialog[hidden] {
  display: none !important;
}

.ma-dialog:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
}

.ma-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 33, 36, 0.48);
}

.ma-dialog__sheet {
  position: relative;
  z-index: 1;
  width: min(34rem, 100%);
  max-height: min(84vh, 40rem);
  overflow: auto;
  background: #ffffff;
  border: 1px solid #d0d0d0;
  padding: 18px 16px 16px;
}

.ma-dialog__close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: transparent;
  padding: 4px;
  cursor: pointer;
}

.ma-dialog__sheet h2 {
  margin: 0 0 10px;
  padding-right: 36px;
  font-size: 1.25rem;
}

.ma-dialog__body ol,
.ma-dialog__body ul {
  margin: 0 0 12px;
  padding-left: 1.2rem;
}

.ma-dialog__body li {
  margin: 0 0 6px;
}

.ma-mirrors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.ma-olderlist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ma-olderlist li {
  padding: 8px 0;
  border-bottom: 1px solid #e6e6e6;
}

.ma-olderlist p {
  margin: 0 0 4px;
  font-weight: 700;
}

/* footer and top link */

.ma-footer {
  border-top: 1px solid #d6d6d6;
  margin-top: 36px;
  padding: 18px 0 48px;
}

.ma-footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 18px;
  align-items: center;
}

.ma-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.ma-footer p {
  margin: 0;
}

.ma-topjump {
  position: fixed;
  right: 10px;
  bottom: 10px;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1px solid var(--ma-link);
  color: var(--ma-link);
  text-decoration: none;
  padding: 6px 8px;
  font-family: Karla, system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
}

/* keep the first screen clear; the link is still in the page without js */
html.ma-ready .ma-topjump {
  opacity: 0;
  pointer-events: none;
}

html.ma-ready .ma-topjump.is-on,
html.ma-ready .ma-topjump:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

/* wider screens */

@media (min-width: 560px) {
  .ma-gallery__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 700px) {
  .ma-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  h1 { font-size: 2.05rem; }
}

@media (max-width: 699px) {
  .ma-user__name {
    display: none;
  }
}

@media (max-width: 899px) {
  html.ma-ready .ma-nav:not(.is-open) {
    display: none;
  }

  .ma-header__bar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand brand"
      "slogan slogan"
      "user menu";
  }

  .ma-user {
    justify-self: start;
  }
}

@media (min-width: 900px) {
  .ma-header__menu {
    display: none;
  }

  .ma-header__bar {
    grid-template-columns: auto minmax(10rem, 1fr) auto;
    grid-template-areas: "brand slogan user";
    padding-top: 12px;
  }

  .ma-header__brand {
    font-size: 1.25rem;
  }
}

@media (min-width: 960px) {
  .ma-frame {
    grid-template-columns: 236px minmax(0, 1fr);
  }

  .ma-frame__main {
    grid-column: 2;
    grid-row: 1;
  }

  .ma-frame__aside {
    grid-column: 1;
    grid-row: 1;
  }
}

@media (min-width: 1100px) {
  .ma-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .ma-rotator__slide {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .ma-facts div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* program title can run long; keep it inside the column */
.ma-page--program .ma-program__title {
  font-size: clamp(1.45rem, 2.4vw, 2.05rem);
}

.ma-page--error .ma-search .ma-button {
  align-self: end;
}

/* сеть: поиск в шапке, состояния и элементы, которых нет в макете */
.ma-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ma-header__find { grid-area: find; display: flex; min-width: 0; }
.ma-header__find input { flex: 1 1 auto; min-width: 0; border: 1px solid #d6d6dc; border-right: 0; background: #fff; color: inherit; padding: 6px 10px; font: inherit; font-size: 0.95rem; border-radius: 6px 0 0 6px; }
.ma-header__find button { display: inline-flex; align-items: center; justify-content: center; width: 38px; border: 1px solid #d6d6dc; background: #fff; border-radius: 0 6px 6px 0; cursor: pointer; }
.ma-header__bar { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "brand user menu" "find find find"; }
.ma-header__slogan { display: none; }
@media (min-width: 900px) {
  .ma-header__bar { grid-template-columns: auto minmax(8rem, 1fr) minmax(200px, 280px) auto; grid-template-areas: "brand slogan find user"; }
  .ma-header__slogan { display: block; }
}
.ma-header__mark { border-radius: 8px; }
.ma-ph { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 12px; background: #fff; border: 1px solid #e0e0e0; color: #7b3fa0; font-weight: 700; text-transform: uppercase; }
.ma-program__icon.ma-ph { width: 64px; height: 64px; }
img.ma-card__icon, img.ma-program__icon, img.ma-rotator__icon { object-fit: contain; }
.ma-favorite .ma-fav__on { display: none; }
.ma-favorite[aria-pressed="true"] .ma-fav__on { display: inline; }
.ma-favorite[aria-pressed="true"] .ma-fav__off { display: none; }
.ma-program__intel { margin-left: 8px; color: #6a6a6a; }
.ma-install { margin-top: 24px; }
.ma-replies:empty { display: none; }
.ma-pager__gap { padding: 4px 6px; color: #6a6a6a; }
.ma-dmca { margin-top: 24px; }
.ma-dmca label > span { display: block; font-weight: 700; margin-bottom: 4px; }
.ma-dmca input[type="text"], .ma-dmca input[type="email"], .ma-dmca input[type="url"], .ma-dmca textarea { width: 100%; }
[id] { scroll-margin-top: 150px; }
@media (min-width: 900px) { [id] { scroll-margin-top: 130px; } }
@media (max-width: 520px) { .ma-topjump__txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* правки аудита 02.11: обложка вместо букв, иконка крупнее, подписи читаемые, текст по ширине колонки, на телефоне карточка в строку */
.ma-card__cover { height: 104px; overflow: hidden; }
.ma-card__icon { width: 72px; height: 72px; border-radius: 16px; }
.ma-card__icon.is-cover { width: 100%; height: 100%; border-radius: 0; object-fit: cover; }
.ma-program__icon.is-cover, .ma-rotator__icon.is-cover { object-fit: cover; border-radius: 12px; border: 1px solid #d6d6d6; }
.ma-card__title { font-size: 1.05rem; }
.ma-card__meta { font-size: 14px; color: #444; }
.ma-card__badge { font-size: 12px; }
.ma-tag--small { font-size: 0.9rem; }
.ma-tag--medium { font-size: 0.98rem; }
.ma-sideblock h2 { font-size: 0.85rem; }
.ma-rotator__kicker { font-size: 0.82rem; }
.ma-intro { max-width: none; }
.ma-section.ma-prose { max-width: none; }
.ma-prose { max-width: 80ch; }
@media (max-width: 699px) {
  .ma-card { flex-direction: row; align-items: center; }
  .ma-card__cover { flex: 0 0 84px; height: 84px; border-bottom: 0; border-right: 1px solid #e6e6e6; }
  .ma-card__icon { width: 60px; height: 60px; }
  .ma-card__badge { top: 4px; right: auto; left: 4px; }
}
