/* MacGamesTorrents — list catalog, light retail shelf */

@font-face {
  font-family: "Libre Franklin";
  src: url("../fonts/libre-franklin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+FEFF;
}

@font-face {
  font-family: "Libre Franklin";
  src: url("../fonts/libre-franklin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+FEFF;
}

:root {
  --mg-paper: #fff;
  --mg-ink: #1b1b1b;
  --mg-accent: #e4572e;
  --mg-slate: #2f4858;
  --mg-line: #e6e6e6;
  --mg-mute: #5c5c5c;
  --mg-soft: #f6f6f6;
  --mg-wrap: 1120px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--mg-paper);
  color: var(--mg-ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

img { max-width: 100%; height: auto; }

button, input, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; }

a { color: var(--mg-slate); }

a:hover { color: var(--mg-ink); }

h1, h2, h3, .mg-brand__word, .mg-face {
  font-family: "Libre Franklin", "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 { font-size: 1.85rem; margin: 0 0 0.45em; }

h2 { font-size: 1.35rem; margin: 0 0 0.4em; font-weight: 600; }

h3 { font-size: 1.08rem; margin: 1.2em 0 0.3em; font-weight: 600; }

p { margin: 0 0 0.8em; }

:focus { outline: none; }

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

.mg-skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: #fff;
  color: var(--mg-ink);
  border: 1px solid var(--mg-ink);
  padding: 8px 12px;
  z-index: 80;
  text-decoration: none;
}

.mg-skip:focus { top: 10px; }

.mg-wrap {
  width: min(var(--mg-wrap), calc(100% - 32px));
  margin-inline: auto;
}

.mg-ico { display: block; flex: 0 0 auto; }

/* header */

.mg-top {
  border-bottom: 1px solid var(--mg-line);
  background: #fff;
}

.mg-top__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand user"
    "line line";
  align-items: center;
  gap: 2px 14px;
  padding: 14px 0 8px;
}

.mg-brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.mg-brand__mark { flex: 0 0 auto; }

.mg-brand__word {
  font-size: 1.02rem;
  letter-spacing: -0.03em;
}

.mg-brand__line {
  grid-area: line;
  margin: 0;
  color: var(--mg-mute);
  font-size: 0.86rem;
}

.mg-brand__count { color: var(--mg-slate); }

.mg-user {
  grid-area: user;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mg-user__in {
  text-decoration: none;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 0.92rem;
  color: var(--mg-slate);
}

.mg-bell {
  position: relative;
  border: 0;
  background: transparent;
  padding: 6px;
  color: var(--mg-ink);
}

.mg-bell__n {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--mg-accent);
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
  font-family: system-ui, sans-serif;
}

.mg-who {
  display: flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  font-size: 0.92rem;
}

.mg-face {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--mg-soft);
  color: var(--mg-slate);
  font-size: 0.72rem;
  font-weight: 700;
}

.mg-face--lg { width: 56px; height: 56px; font-size: 1rem; }

.mg-out {
  border: 0;
  background: transparent;
  color: var(--mg-slate);
  padding: 6px 2px;
  font-size: 0.88rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mg-drop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 300px;
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  box-shadow: 0 10px 26px rgba(27, 27, 27, 0.12);
  z-index: 30;
  padding: 6px 0 0;
}

.mg-drop__list { list-style: none; margin: 0; padding: 0; }

.mg-drop__list a {
  display: block;
  padding: 8px 12px;
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
}

.mg-drop__list time {
  display: block;
  color: var(--mg-mute);
  font-size: 0.78rem;
  margin-top: 2px;
}

.mg-drop li.is-new { background: var(--mg-soft); }

.mg-drop__all {
  display: block;
  padding: 10px 12px;
  border-top: 1px solid var(--mg-line);
  font-size: 0.88rem;
}

.mg-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 0 0 10px;
}

.mg-nav a {
  text-decoration: none;
  color: var(--mg-ink);
  padding: 8px 10px;
  font-size: 0.94rem;
  border-radius: 4px;
}

.mg-nav a[aria-current="page"] {
  color: var(--mg-accent);
  box-shadow: inset 0 -2px 0 var(--mg-accent);
  border-radius: 0;
}

.mg-nav--bar { display: none; }

.mg-menu { padding-bottom: 10px; }

.mg-menu__btn {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 0.92rem;
}

/* safari: otherwise the disclosure triangle sits beside our icon */
.mg-menu__btn::-webkit-details-marker { display: none; }

.mg-menu .mg-nav { padding: 8px 0 0; }

@media (max-width: 599px) {
  .mg-who__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mg-drop {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 58px;
    width: auto;
  }
}

@media (min-width: 48rem) {
  .mg-brand__word { font-size: 1.38rem; }
  .mg-top__bar {
    grid-template-areas: "brand line user";
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    padding-bottom: 4px;
  }
  .mg-brand__line { padding-left: 6px; }
  .mg-nav--bar { display: flex; }
  .mg-menu { display: none; }
}

/* shells */

.mg-shell {
  display: grid;
  gap: 28px;
  padding: 22px 0 48px;
  align-items: start;
}

.mg-shell__main { min-width: 0; }

.mg-side { display: grid; gap: 16px; min-width: 0; }

.mg-side__box {
  border: 1px solid var(--mg-line);
  border-radius: 6px;
  padding: 14px 14px 10px;
  background: #fff;
}

.mg-side__title {
  font-size: 1.02rem;
  margin: 0 0 8px;
}

.mg-pop { list-style: none; margin: 0; padding: 0; }

.mg-pop__row {
  display: grid;
  grid-template-columns: 1.4rem 36px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-top: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
}

.mg-pop__n {
  color: var(--mg-slate);
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
}

.mg-pop__name { display: block; font-weight: 600; font-size: 0.92rem; }

.mg-pop__meta { display: block; color: var(--mg-mute); font-size: 0.78rem; }

.mg-bench p:last-child { margin-bottom: 0; }

@media (min-width: 980px) {
  .mg-shell {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 36px;
  }
  .mg-side--stick { position: sticky; top: 14px; }
}

/* home */

.mg-kicker {
  margin: 0 0 6px;
  color: var(--mg-accent);
  font-family: system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mg-hero { margin-bottom: 22px; }

.mg-hero .mg-prose { font-size: 1.02rem; }

.mg-week { margin: 8px 0 28px; }

.mg-week__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.mg-week__nav { display: flex; gap: 6px; }

.mg-week__nav button,
.mg-light__x,
.mg-modal__x {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #cfcfcf;
  background: #fff;
  border-radius: 4px;
  color: var(--mg-ink);
}

.mg-week__track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 2px;
  padding-bottom: 8px;
  max-width: 100%;
}

.mg-week__card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--mg-line);
  border-radius: 6px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  background: #fff;
}

.mg-week__card img { width: 48px; height: 48px; }

.mg-week__name { font-weight: 700; letter-spacing: -0.01em; }

.mg-week__blurb {
  color: var(--mg-mute);
  font-size: 0.88rem;
  flex: 1;
}

.mg-week__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--mg-slate);
}

.mg-block { margin: 0 0 28px; }

.mg-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.mg-block__more {
  font-size: 0.9rem;
  white-space: nowrap;
}

/* program rows — icon, name, one line, version, size */

.mg-list { margin: 0; }

.mg-list__row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-areas:
    "ico name"
    "ico blurb"
    "ico meta";
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  padding: 13px 2px;
  border-bottom: 1px solid var(--mg-line);
  text-decoration: none;
  color: inherit;
}

.mg-list__row:hover { background: var(--mg-soft); }

.mg-list__ico {
  grid-area: ico;
  width: 56px;
  height: 56px;
}

.mg-list__name {
  grid-area: name;
  font-weight: 700;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

.mg-list__blurb {
  grid-area: blurb;
  color: #444;
  font-size: 0.92rem;
}

.mg-list__meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  font-size: 0.82rem;
}

.mg-list__cat { color: var(--mg-slate); }

.mg-list__ver,
.mg-list__size,
.mg-facts dd,
.mg-week__meta {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.mg-list__size { color: var(--mg-mute); }

.mg-list__flag {
  color: var(--mg-accent);
  font-family: system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

@media (min-width: 860px) {
  .mg-list__row {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    grid-template-areas:
      "ico name meta"
      "ico blurb meta";
  }
  .mg-list__meta {
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    max-width: 13rem;
    gap: 3px;
  }
}

/* crumbs, pager, buttons */

.mg-crumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  font-size: 0.86rem;
}

.mg-crumb li + li::before {
  content: "/";
  color: #9a9a9a;
  padding: 0 6px;
}

.mg-lead { margin-bottom: 8px; }

.mg-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 16px;
}

.mg-pager a,
.mg-pager span {
  min-width: 36px;
  text-align: center;
  padding: 6px 10px;
  border: 1px solid #d2d2d2;
  border-radius: 4px;
  text-decoration: none;
  color: var(--mg-ink);
  font-size: 0.9rem;
}

.mg-pager a[aria-current="page"] {
  background: var(--mg-accent);
  border-color: var(--mg-accent);
  color: #fff;
}

.mg-pager span[aria-disabled="true"] {
  color: #9a9a9a;
}

.mg-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--mg-accent);
  color: #fff;
  text-decoration: none;
  border: 1px solid var(--mg-accent);
  border-radius: 4px;
  padding: 0.55rem 0.9rem;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
}

.mg-btn:hover { color: #fff; box-shadow: inset 0 0 0 100px rgba(0, 0, 0, 0.08); }

a.mg-btn { color: #fff; }

.mg-btn--quiet,
a.mg-btn.mg-btn--quiet {
  background: #fff;
  color: var(--mg-slate);
  border-color: #c8c8c8;
  font-weight: 600;
}

.mg-btn--quiet:hover,
a.mg-btn.mg-btn--quiet:hover {
  color: var(--mg-ink);
  background: var(--mg-soft);
  box-shadow: none;
}

.mg-fav[aria-pressed="true"] {
  background: var(--mg-slate);
  border-color: var(--mg-slate);
  color: #fff;
}

.mg-fav[aria-pressed="true"]:hover { color: #fff; }

/* program */

.mg-prog {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px 14px;
  align-items: start;
  margin-bottom: 16px;
}

.mg-prog__ico { width: 64px; height: 64px; }

.mg-prog h1 { font-size: clamp(1.45rem, 3.4vw, 2.05rem); overflow-wrap: anywhere; }

.mg-chip {
  display: inline-block;
  margin-top: 4px;
  color: var(--mg-slate);
  font-size: 0.86rem;
}

.mg-prog__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.mg-shots { margin: 0 0 18px; }

.mg-shots figcaption {
  color: var(--mg-mute);
  font-size: 0.86rem;
  margin-bottom: 8px;
}

.mg-shots__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mg-shots__cell {
  display: block;
  border: 1px solid var(--mg-line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--mg-soft);
  padding: 0;
  color: inherit;
}

.mg-shots__cell img { display: block; width: 100%; height: auto; }

.mg-facts { margin: 0; }

.mg-facts div { padding: 7px 0; border-bottom: 1px solid #efefef; }

.mg-facts dt {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mg-mute);
}

.mg-facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }

.mg-facts__bench {
  border-left: 3px solid var(--mg-slate);
  padding-left: 8px;
}

.mg-facts__bench dt { color: var(--mg-slate); }

.mg-updated { color: var(--mg-mute); font-size: 0.86rem; margin: 10px 0 0; }

.mg-tabs { margin-top: 6px; }

.mg-tabs__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--mg-line);
  margin-bottom: 14px;
}

.mg-tabs__btn {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 10px 12px;
  color: #3a3a3a;
  text-decoration: none;
  font-size: 0.95rem;
}

.mg-tabs__btn[aria-selected="true"] {
  color: var(--mg-accent);
  border-bottom-color: var(--mg-accent);
  font-weight: 700;
}

.mg-tabs__pane[hidden] { display: none !important; }

.mg-prose { max-width: 68ch; font-size: 1.05rem; line-height: 1.65; }

.mg-prose h2 { margin: 1.45em 0 0.35em; font-size: 1.32rem; }

.mg-prose h3 { margin: 1.15em 0 0.25em; }

.mg-prose ul, .mg-prose ol { margin: 0 0 0.9em; padding-left: 1.2em; }

.mg-prose li { margin: 0.2em 0; }

.mg-prose blockquote {
  margin: 0 0 1rem;
  padding: 0.15rem 0 0.15rem 14px;
  border-left: 3px solid var(--mg-slate);
}

.mg-prose code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: #f3f3f3;
  padding: 0.08em 0.32em;
  border-radius: 3px;
}

.mg-tablewrap { overflow-x: auto; max-width: 100%; margin: 0 0 1rem; }

.mg-prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }

.mg-prose th,
.mg-prose td {
  text-align: left;
  vertical-align: top;
  padding: 7px 8px;
  border-bottom: 1px solid var(--mg-line);
}

.mg-prose th {
  font-family: "Libre Franklin", sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
}

.mg-toc {
  border-left: 3px solid var(--mg-slate);
  padding: 2px 0 2px 14px;
  margin: 0 0 1.3rem;
  font-size: 0.95rem;
}

.mg-toc p { margin: 0 0 4px; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--mg-slate); }

.mg-toc ol { margin: 0; padding-left: 1.15rem; }

.mg-faq { margin: 22px 0 8px; border-top: 1px solid var(--mg-line); }

.mg-faq h2 { margin-top: 18px; }

.mg-faq__item { border-bottom: 1px solid var(--mg-line); }

.mg-faq__item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  font-weight: 600;
}

.mg-faq__item summary::-webkit-details-marker { display: none; }

.mg-faq__item[open] .mg-faq__chev { transform: rotate(180deg); }

.mg-faq__chev { transition: transform 0.15s linear; }

.mg-by {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  margin: 22px 0;
  padding-top: 8px;
}

.mg-by p { margin: 0 0 0.35em; }

/* comments */

.mg-cmt { margin-top: 10px; }

.mg-cmt__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.mg-cmt__count { color: var(--mg-mute); font-weight: 600; font-size: 0.85em; }

.mg-cmt__sort { display: flex; gap: 4px; }

.mg-cmt__sort button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 6px 8px;
  color: #3a3a3a;
}

.mg-cmt__sort button[aria-pressed="true"] {
  color: var(--mg-accent);
  border-bottom-color: var(--mg-accent);
}

.mg-cmt__list { list-style: none; margin: 8px 0 0; padding: 0; }

.mg-cmt__item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid #efefef;
}

.mg-cmt__item--held { opacity: 0.55; }

.mg-cmt__item header { font-size: 0.92rem; margin-bottom: 4px; }

.mg-cmt__item time { color: var(--mg-mute); font-weight: 400; margin-left: 6px; }

.mg-cmt__tools { display: flex; gap: 12px; align-items: center; }

.mg-cmt__tools button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 0;
  padding: 2px 0;
  color: var(--mg-slate);
  font-size: 0.88rem;
}

.mg-cmt__like[aria-pressed="true"] { color: var(--mg-accent); }

.mg-cmt__replies {
  margin-top: 8px;
  padding-left: 8px;
  border-left: 2px solid #e4e4e4;
}

.mg-cmt__item--reply { border-bottom: 0; padding: 10px 0; }

.mg-reply { margin-top: 8px; }

.mg-empty {
  color: var(--mg-mute);
  padding: 12px 0;
}

.mg-more { padding-bottom: 36px; }

.mg-more h2 { margin-bottom: 6px; }

/* forms, account, errors */

.mg-form { display: grid; gap: 12px; max-width: 440px; }

.mg-form__row { display: grid; gap: 4px; }

.mg-form label { font-size: 0.9rem; font-weight: 600; }

.mg-form input[type="text"],
.mg-form input[type="email"],
.mg-form input[type="password"],
.mg-form input[type="search"],
.mg-form textarea {
  width: 100%;
  border: 1px solid #c8c8c8;
  border-radius: 4px;
  padding: 8px 10px;
  background: #fff;
}

.mg-form textarea { min-height: 110px; resize: vertical; }

.mg-form__check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
}

.mg-form__check input { width: auto; }

.mg-form__links { font-size: 0.92rem; margin: 0; }

.mg-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.mg-alert {
  border: 1px solid var(--mg-accent);
  border-radius: 4px;
  padding: 8px 10px;
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.mg-alert--ok { border-color: var(--mg-slate); }

.mg-fielderr {
  margin: 0;
  color: var(--mg-accent);
  font-size: 0.84rem;
}

.mg-hint { color: var(--mg-mute); font-size: 0.86rem; margin: 0; }

.mg-acct {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.mg-acct h1 { margin: 0; }

.mg-acct p { margin: 2px 0 0; color: var(--mg-mute); }

.mg-mine {
  padding: 12px 0;
  border-bottom: 1px solid var(--mg-line);
}

.mg-mine p { margin: 4px 0; }

.mg-notes { list-style: none; margin: 0; padding: 0; }

.mg-notes li {
  display: grid;
  gap: 2px;
  padding: 10px 8px;
  border-bottom: 1px solid #efefef;
}

.mg-notes li.is-new { background: var(--mg-soft); }

.mg-notes time { color: var(--mg-mute); font-size: 0.8rem; }

.mg-badge {
  display: inline-block;
  border: 1px solid var(--mg-accent);
  color: var(--mg-accent);
  border-radius: 2px;
  padding: 1px 6px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 6px;
  vertical-align: middle;
}

.mg-badge--no {
  color: var(--mg-slate);
  border-color: var(--mg-slate);
}

.mg-err h1 { margin-top: 4px; }

.mg-find {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  max-width: 520px;
}

.mg-find label { flex: 1 0 100%; font-weight: 600; font-size: 0.9rem; }

.mg-find input[type="search"] {
  flex: 1 1 180px;
  border: 1px solid #c8c8c8;
  border-radius: 4px;
  padding: 8px 10px;
}

.mg-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 16px; padding: 0; }

.mg-chips a {
  display: inline-block;
  border: 1px solid #d4d4d4;
  border-radius: 4px;
  padding: 4px 8px;
  text-decoration: none;
  font-size: 0.9rem;
}

/* modals + lightbox */

.mg-modal,
.mg-light {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
}

.mg-modal[hidden],
.mg-light[hidden],
.mg-drop[hidden] { display: none !important; }

.mg-modal__back,
.mg-light__back {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(27, 27, 27, 0.48);
  padding: 0;
}

.mg-modal__box,
.mg-light__box {
  position: relative;
  z-index: 1;
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  width: min(640px, 100%);
  max-height: min(86vh, 780px);
  overflow: auto;
  padding: 20px 20px 24px;
}

.mg-light__box { width: min(960px, 100%); padding: 16px; }

.mg-modal__x,
.mg-light__x { position: absolute; top: 10px; right: 10px; }

.mg-modal h2,
.mg-light__cap { padding-right: 36px; }

.mg-light__cap { margin: 0 0 8px; font-size: 0.95rem; }

.mg-light__img { display: block; width: 100%; height: auto; background: var(--mg-soft); }

.mg-builds {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.mg-builds__group {
  border-top: 1px solid var(--mg-line);
  padding-top: 10px;
}

.mg-builds__group .mg-btn { margin: 0 8px 8px 0; }

.mg-older { list-style: none; margin: 0; padding: 0; }

.mg-older li {
  padding: 10px 0;
  border-bottom: 1px solid var(--mg-line);
}

.is-locked { overflow: hidden; }

/* reading bar */

.mg-read {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  z-index: 70;
  pointer-events: none;
}

.mg-read__bar {
  display: block;
  height: 3px;
  width: 0;
  background: var(--mg-accent);
}

.mg-foot {
  border-top: 1px solid var(--mg-line);
  padding: 18px 0 28px;
  color: var(--mg-mute);
  font-size: 0.9rem;
}

.mg-foot__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  justify-content: space-between;
}

.mg-foot__nav { display: flex; flex-wrap: wrap; gap: 8px 14px; }

.mg-foot__nav a { color: var(--mg-slate); }

.mg-foot button {
  background: transparent;
  border: 0;
  color: var(--mg-slate);
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mg-up {
  position: fixed;
  right: 14px;
  bottom: 14px;
  display: none;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  padding: 6px 8px;
  color: var(--mg-slate);
  text-decoration: none;
  font-size: 0.82rem;
  z-index: 25;
}

.mg-up.is-on { display: inline-flex; }

@media (min-width: 800px) {
  .mg-shots__grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mg-faq__chev { transition: none; }
}

/* program page: bench label sits tighter than the other spec rows */
.mg-prog + .mg-shell .mg-facts__bench { margin-top: 4px; }

/* сеть: липкая шапка с поиском (DOCS §4.3), вход акцентом, высоты 36px, заглушки иконок, Intel-метка */
.mg-top { position: sticky; top: 0; z-index: 40; }
.mg-top__bar {
  grid-template-areas:
    "brand user"
    "seek seek";
  gap: 8px 14px;
  padding: 10px 0 8px;
}
.mg-brand__mark { width: 34px; height: 34px; border-radius: 8px; }
.mg-brand__line { display: none; }
.mg-seek { grid-area: seek; position: relative; margin: 0; }
.mg-seek__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mg-seek__ico { position: absolute; left: 10px; top: 10px; color: var(--mg-mute); pointer-events: none; }
.mg-seek__input {
  width: 100%;
  height: 36px;
  border: 1px solid #c8c8c8;
  border-radius: 4px;
  padding: 0 10px 0 32px;
  background: var(--mg-soft);
  font: inherit;
  font-size: 0.92rem;
  color: var(--mg-ink);
}
.mg-seek__input:focus { background: #fff; border-color: var(--mg-slate); }
.mg-user__in {
  display: inline-flex;
  align-items: center;
  height: 36px;
  box-sizing: border-box;
  padding: 0 14px;
  background: var(--mg-accent);
  border-color: var(--mg-accent);
  color: #fff;
  font-weight: 600;
}
.mg-user__in:hover { color: #fff; filter: brightness(0.94); }
.mg-bell, .mg-out { height: 36px; box-sizing: border-box; display: inline-flex; align-items: center; }
.mg-bell { width: 36px; justify-content: center; }
.mg-who .mg-face { width: 32px; height: 32px; }
.mg-ph {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--mg-soft);
  border: 1px solid var(--mg-line);
  color: var(--mg-slate);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
}
.mg-ph--md { width: 48px; height: 48px; border-radius: 10px; }
.mg-ph--sm { width: 36px; height: 36px; border-radius: 8px; font-size: 0.75rem; }
.mg-prog__ico.mg-ph { width: 64px; height: 64px; font-size: 1.2rem; }
.mg-list__ico, .mg-prog__ico, .mg-week__card img, .mg-pop__row img { object-fit: contain; border-radius: 12px; }
.mg-chip--warn { color: var(--mg-accent); border-color: var(--mg-accent); }
.mg-gate { max-width: 520px; }
.mg-install { margin-top: 24px; }
.mg-acct { display: flex; align-items: center; gap: 14px; margin: 8px 0 16px; }
.mg-acct h1 { margin: 0; }
@media (min-width: 48rem) {
  .mg-top__bar {
    grid-template-areas: "brand seek user";
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 12px 0 6px;
  }
  .mg-seek { max-width: 420px; justify-self: end; width: 100%; }
}
@media (min-width: 72rem) {
  .mg-top__bar { grid-template-areas: "brand line seek user"; grid-template-columns: auto minmax(0, 1fr) minmax(260px, 360px) auto; }
  .mg-brand__line { display: block; }
  .mg-seek { max-width: none; }
}
[id] { scroll-margin-top: 140px; }
@media (min-width: 48rem) { [id] { scroll-margin-top: 110px; } }

/* правки аудита 02.11: версия и размер рядом с названием (не у правого края), подписи крупнее, обложка вместо букв */
.mg-list__ico.is-cover, .mg-prog__ico.is-cover, .mg-week__card img.is-cover, .mg-pop__row img.is-cover { object-fit: cover; }
.mg-list__meta { font-size: 0.9rem; }
@media (min-width: 860px) {
  .mg-list__row {
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas:
      "ico name"
      "ico blurb"
      "ico meta";
  }
  .mg-list__meta { flex-direction: row; align-items: baseline; text-align: left; max-width: none; gap: 4px 12px; }
}
.mg-list__flag { font-size: 0.78rem; }
.mg-week__meta { font-size: 0.875rem; }
.mg-pop__meta { font-size: 0.85rem; }
.mg-facts dt { font-size: 0.78rem; }
.mg-kicker { font-size: 0.8rem; }
/* правки 02.11 (2): лента «New this week» без системной полосы — листается стрелками */
.mg-week__track { scrollbar-width: none; }
.mg-week__track::-webkit-scrollbar { display: none; }
