/* =========================================================
   Web pages: home, issue landing, TOC, articles, sections,
   community, kit, issues, store
   ========================================================= */

/* ---------- Home: cover hero ---------- */
.mg-hero { background: var(--tone); color: var(--on-tone); position: relative; overflow: hidden; border-bottom: 3px solid var(--ink); }
.mg-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(11,11,15,.16) 1.2px, transparent 1.6px);
  background-size: 9px 9px;
  -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 85%);
  mask-image: linear-gradient(100deg, transparent 30%, #000 85%);
}
.mg-hero__grid { display: grid; grid-template-columns: minmax(320px, 5fr) 7fr; gap: clamp(32px, 5vw, 80px); align-items: center; padding-block: clamp(40px, 5vw, 72px) clamp(56px, 6vw, 96px); position: relative; }
.mg-hero__cover { position: relative; max-width: 520px; width: 100%; justify-self: center; }
.mg-hero__mag { display: block; transform: rotate(-2.4deg); box-shadow: 18px 22px 0 var(--ink), 0 40px 70px -30px rgba(0,0,0,.7); transition: transform 0.4s var(--ease); border: 2px solid var(--ink); }
.mg-hero__mag:hover { transform: rotate(0deg) translateY(-6px); }
.mg-hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.mg-hero__issue { font-family: var(--f-pixel); font-size: 14px; }
.mg-hero__issue b { color: var(--c-primary); font-weight: 400; background: var(--ink); padding: 4px 8px 2px; margin-left: 6px; }
.mg-hero__title { font-size: clamp(56px, 7.6vw, 136px); line-height: 0.84; max-width: 9ch; }
.mg-hero__copy .mg-deck { max-width: 46ch; }
.mg-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.mg-hero__stats { display: flex; gap: 0; border: var(--border); background: var(--paper); color: var(--ink); margin-top: 8px; }
.mg-hero__stats > div { padding: 10px 18px 8px; }
.mg-hero__stats > div + div { border-left: var(--border); }
.mg-hero__stats dt { font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gray-3); }
.mg-hero__stats dd { font-family: var(--f-head); font-size: 40px; line-height: 1; }
.mg-hero__lines { list-style: none; padding: 0; width: 100%; max-width: 640px; border-top: 3px solid var(--ink); margin-top: 8px; }
.mg-hero__lines a { display: grid; grid-template-columns: 120px 1fr auto; gap: 14px; align-items: baseline; padding: 11px 0 9px; border-bottom: 1px solid rgba(11,11,15,.35); text-decoration: none; color: inherit; }
.mg-hero__lines small { font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; }
.mg-hero__lines span { font-family: var(--f-sub); font-weight: 800; font-size: 16px; text-transform: uppercase; letter-spacing: 0.02em; }
.mg-hero__lines b { font-family: var(--f-pixel); font-size: 9px; font-weight: 400; }
.mg-hero__lines a:hover span { color: var(--c-primary); }

.mg-manifesto { background: var(--ink); color: var(--paper); overflow: hidden; white-space: nowrap; border-top: 3px solid var(--ink); position: relative; }
.mg-manifesto__track { display: inline-flex; align-items: center; animation: mg-marquee 30s linear infinite; padding-block: 14px 10px; }
.mg-manifesto span { font-family: var(--f-head); font-size: clamp(28px, 3.4vw, 52px); text-transform: uppercase; line-height: 1; padding-inline: 28px; }
.mg-manifesto i { font-style: normal; color: var(--c-secondary); font-size: 28px; }

/* ---------- Home: current issue strip ---------- */
.mg-issue-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 26px; }

.mg-card__title em { font-style: normal; color: var(--tone, var(--c-primary)); }
.mg-card--dark .mg-card__title em, .mg-block--tone .mg-card__title em, .mg-duo .mg-card__title em { color: inherit; text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.08em; }

/* ---------- Stacks ---------- */
.mg-stack { display: flex; flex-direction: column; gap: 26px; }
.mg-stack > .mg-card--row + .mg-card--row { border-top: 1px solid rgba(11,11,15,.25); padding-top: 26px; }

/* ---------- Home: Retro Chile ---------- */
.mg-chile { overflow: hidden; }
.mg-chile::before {
  content: "CHILE CHILE CHILE CHILE CHILE CHILE";
  position: absolute; left: -2%; top: 50%; transform: translateY(-50%) rotate(-6deg);
  font-family: var(--f-head); font-size: 34vw; line-height: 0.8; white-space: nowrap; color: rgba(0,0,0,.08); pointer-events: none;
}
.mg-chile__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 72px); align-items: center; position: relative; }
.mg-chile__title { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.mg-chile__title .mg-display { font-size: clamp(80px, 10vw, 180px); line-height: 0.8; }
.mg-chile__title .mg-display span { color: var(--yellow); display: inline-block; transform: translateY(-0.1em); font-size: 0.6em; margin-left: 0.1em; }
.mg-chile__title .mg-btn { box-shadow: 4px 4px 0 var(--ink); }
.mg-chile__collage { position: relative; min-height: 460px; }
.mg-chile__photo { position: absolute; margin: 0; border: 8px solid var(--paper); box-shadow: 12px 12px 0 var(--ink); }
.mg-chile__photo .mg-img { position: absolute; inset: 0; }
.mg-chile__photo--a { left: 0; top: 0; width: 70%; aspect-ratio: 4 / 3; transform: rotate(-3deg); z-index: 2; }
.mg-chile__photo--b { right: 0; bottom: 0; width: 52%; aspect-ratio: 1; transform: rotate(4deg); z-index: 1; }
.mg-chile .mg-card--text { border-top-color: var(--paper); }
.mg-chile .mg-card__meta, .mg-chile .mg-card__deck { color: rgba(255,255,255,.82); }
.mg-chile .mg-card__link:hover .mg-card__title { color: var(--yellow); }

/* ---------- Home: hardware ---------- */
.mg-hw { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(24px, 4vw, 56px); align-items: stretch; }
.mg-hw__img { margin: 0; border: var(--border); min-height: 420px; position: relative; box-shadow: var(--shadow-hard); }
.mg-hw__img .mg-img { position: absolute; inset: 0; }
.mg-hw__list { display: flex; flex-direction: column; gap: 22px; }

/* ---------- Home: duo (homebrew + preservation) ---------- */
.mg-duo { display: grid; grid-template-columns: 1fr 1fr; border-block: 3px solid var(--ink); }
.mg-duo__half { background: var(--tone); color: var(--on-tone); padding-block: clamp(48px, 6vw, 88px); }
.mg-duo__half + .mg-duo__half { border-left: 3px solid var(--ink); }
.mg-duo__inner { max-width: calc(var(--wrap) / 2); padding-inline: var(--pad); display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.mg-duo__half:first-child .mg-duo__inner { margin-left: auto; }
.mg-duo__half .mg-sechead__num { background: var(--ink); color: var(--paper); }
.mg-duo__img { width: 100%; aspect-ratio: 16 / 9; border: var(--border); box-shadow: var(--shadow-hard); }
.mg-duo .mg-card { width: 100%; border-top: 2px solid currentColor; padding-top: 18px; }
.mg-duo .mg-card__meta, .mg-duo .mg-card__deck { color: inherit; opacity: 0.85; }
.mg-duo .mg-card__link:hover .mg-card__title { color: inherit; text-decoration: underline; text-decoration-thickness: 3px; }

/* ---------- Community wall ---------- */
.mg-wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 20px; align-items: start; padding: 6px; }
.mg-wall > :nth-child(3n+1) { --rot: -2deg; }
.mg-wall > :nth-child(3n+2) { --rot: 1.6deg; margin-top: 24px; }
.mg-wall > :nth-child(3n) { --rot: -1deg; }
.mg-post.mg-reveal.is-in, .no-js .mg-post { transform: rotate(var(--rot, 0deg)); }
.mg-post.mg-reveal.is-in:hover { transform: rotate(0) translateY(-4px); }

/* ---------- Upcoming issues + kit promo ---------- */
.mg-issues-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px; }
.mg-kitpromo {
  display: grid; grid-template-columns: 4fr 5fr 4fr; gap: clamp(24px, 3vw, 48px); align-items: center;
  margin-top: clamp(56px, 7vw, 96px); padding: clamp(28px, 4vw, 56px);
  background: var(--ink); color: var(--paper); border: 3px solid var(--ink); box-shadow: 12px 12px 0 var(--tone);
  position: relative; overflow: hidden;
}
.mg-kitpromo::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px); pointer-events: none; }
.mg-kitpromo__copy { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; position: relative; }
.mg-kitpromo__copy .mg-h1 { font-size: clamp(40px, 4.6vw, 76px); }
.mg-kitpromo__copy .mg-h1 em { font-style: normal; color: var(--tone); }
.mg-kitpromo__copy .mg-tag { color: var(--gray-2); }
.mg-kitpromo__img { margin: 0; aspect-ratio: 4 / 5; position: relative; border: 2px solid var(--gray-3); }
.mg-kitpromo__img .mg-img { position: absolute; inset: 0; }
.mg-kitpromo__usb { position: relative; }

/* ---------- Issue landing ---------- */
.mg-issuehead { background: var(--tone); color: var(--on-tone); border-bottom: 3px solid var(--ink); }
.mg-issuehead__grid { display: grid; grid-template-columns: minmax(280px, 4fr) 8fr; gap: clamp(32px, 5vw, 80px); align-items: center; padding-block: clamp(40px, 5vw, 72px); }
.mg-issuehead__cover { display: block; max-width: 440px; border: 2px solid var(--ink); box-shadow: 14px 16px 0 var(--ink); transform: rotate(-1.6deg); transition: transform 0.35s var(--ease); }
.mg-issuehead__cover:hover { transform: none; }
.mg-issuehead__copy { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.mg-issuehead__copy .mg-display { font-size: clamp(56px, 7vw, 124px); line-height: 0.84; max-width: 11ch; }

/* ---------- TOC page ---------- */
.mg-tocpage { display: grid; grid-template-columns: minmax(320px, 5fr) 7fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.mg-tocpage__page { position: sticky; top: 90px; box-shadow: var(--shadow-soft); border: 1px solid rgba(0,0,0,.15); }
.mg-tocpage__page .mg-page { position: relative; }
.mg-toclist { list-style: none; padding: 0; margin-top: 32px; border-top: 3px solid var(--ink); }
.mg-toclist a { display: grid; grid-template-columns: 84px 1fr auto auto; gap: 16px; align-items: center; padding: 12px 0 10px; border-bottom: 1px solid var(--paper-3); text-decoration: none; color: inherit; }
.mg-toclist b { font-family: var(--f-head); font-weight: 400; font-size: 30px; line-height: 0.9; color: var(--tone); -webkit-text-stroke: 1px var(--ink); }
.mg-toclist span { font-family: var(--f-sub); font-weight: 800; font-size: 17px; line-height: 1.2; }
.mg-toclist small { display: block; font-family: var(--f-mono); font-weight: 400; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gray-3); margin-bottom: 2px; }
.mg-toclist a:hover span { color: var(--c-primary); }
.mg-toclist__web { font-style: normal; font-family: var(--f-pixel); font-size: 8px; background: var(--ink); color: var(--paper); padding: 5px 5px 3px; }

/* ---------- Generic page head ---------- */
.mg-pagehead { background: var(--tone, var(--paper)); color: var(--on-tone, var(--ink)); padding-block: clamp(48px, 6vw, 96px) clamp(32px, 4vw, 56px); border-bottom: 3px solid var(--ink); position: relative; overflow: visible; }
.mg-pagehead .mg-wrap > div:not([class]), .mg-pagehead .mg-wrap { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.mg-pagehead .mg-display { font-size: clamp(56px, 9vw, 160px); line-height: 1.08; padding-top: 0.22em; overflow: visible; }
.mg-pagehead .mg-display em { font-style: normal; color: var(--c-primary); }
.mg-pagehead .mg-deck { max-width: 52ch; }
.mg-pagehead--ink { background: var(--ink); color: var(--paper); }
.mg-pagehead--ink .mg-display em { color: var(--tone, var(--c-secondary)); }
.mg-pagehead__split.mg-wrap { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 5vw, 72px); align-items: center; }

.mg-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mg-filter a {
  font-family: var(--f-sub); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px;
  text-decoration: none; color: var(--ink); border: var(--border); padding: 8px 12px 7px; background: var(--paper);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.mg-filter a:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }
.mg-filter a.is-active { background: var(--tone, var(--ink)); color: var(--on-tone, var(--paper)); box-shadow: 3px 3px 0 var(--ink); }
.mg-filter a.is-active:not([data-tone]) { background: var(--ink); color: var(--paper); }

/* ---------- Article ---------- */
.mg-article__head { background: var(--tone); color: var(--on-tone); padding-block: clamp(36px, 4vw, 64px) clamp(120px, 12vw, 200px); border-bottom: 3px solid var(--ink); }
.mg-article__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; border-bottom: 2px solid currentColor; padding-bottom: 14px; }
.mg-article__bar .mg-kicker { background: var(--ink); color: var(--paper); text-decoration: none; }
.mg-article__pages { margin-left: auto; color: inherit; text-decoration: none; border: 1px solid currentColor; padding: 4px 8px; }
.mg-article__pages:hover { background: var(--ink); color: var(--paper); }
.mg-article__title { font-family: var(--f-head); font-weight: 400; text-transform: uppercase; font-size: clamp(54px, 8vw, 148px); line-height: 0.84; margin-top: 26px; max-width: 14ch; }
.mg-article__title em { font-style: normal; color: var(--ink); }
[data-tone="ink"] .mg-article__title em { color: var(--c-secondary); }
[data-tone="red"] .mg-article__title em, [data-tone="magenta"] .mg-article__title em { color: var(--yellow); }
.mg-article__deck { max-width: 60ch; margin-top: 22px; }
.mg-article__byline { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.mg-article__byline strong { display: block; font-family: var(--f-sub); font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; font-size: 14px; }
.mg-article__byline small { font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; }
.mg-article__avatar { width: 48px; height: 48px; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-family: var(--f-head); font-size: 26px; border: 2px solid var(--paper); }
.mg-article__hero { margin-top: calc(clamp(120px, 12vw, 200px) * -1 + 24px); position: relative; z-index: 2; }
.mg-article__hero > .mg-img { aspect-ratio: 21 / 9; border: 3px solid var(--ink); box-shadow: 12px 12px 0 var(--ink); overflow: visible; }
.mg-article__hero > .mg-img img { position: absolute; inset: 0; }
.mg-article__hero .mg-caption { position: absolute; top: 100%; bottom: auto; background: none; color: var(--gray-3); padding: 10px 0 0; }
.mg-article__layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); padding-block: clamp(64px, 7vw, 104px); }
.mg-article__aside { display: flex; flex-direction: column; gap: 28px; align-self: start; position: sticky; top: 90px; }
.mg-article__mini { display: flex; flex-direction: column; gap: 10px; position: relative; }
.mg-article__minilink { color: inherit; text-decoration: none; }
.mg-article__minilink::before { content: ""; position: absolute; inset: 0; z-index: 2; }
.mg-article__minipage { box-shadow: var(--shadow-soft); border: 1px solid rgba(0,0,0,.15); pointer-events: none; }
.mg-article__minipage .mg-pg__run, .mg-article__minipage .mg-pg__folio { display: none; }
.mg-article__mini:hover .mg-article__minipage { outline: 3px solid var(--c-primary); outline-offset: 3px; }
.mg-authorcard { border-top: 3px solid var(--ink); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.mg-authorcard strong { font-family: var(--f-head); font-weight: 400; font-size: 28px; text-transform: uppercase; line-height: 1; }
.mg-authorcard p { font-family: var(--f-body); font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.mg-article__body { max-width: 760px; }
.mg-article__body .mg-blocks { zoom: var(--text-scale, 1); }
.mg-textsize { margin-bottom: 22px; }
.mg-textsize output { font-family: var(--f-mono); font-weight: 400; font-size: 10px; color: var(--gray-3); }
.mg-textsize button { font-size: 15px; min-width: 44px; }
.mg-article__end { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 56px; padding-top: 24px; border-top: 3px solid var(--ink); }

/* ---------- Section opener ---------- */
.mg-secopen { position: relative; min-height: min(78vh, 720px); display: flex; align-items: flex-end; background: var(--tone); color: var(--on-tone); border-bottom: 3px solid var(--ink); overflow: hidden; }
.mg-secopen__img { position: absolute; inset: 0 0 0 38%; }
.mg-secopen__img .mg-img { position: absolute; inset: 0; }
.mg-secopen__img::before { content: ""; position: absolute; inset: 0; z-index: 3; background: linear-gradient(90deg, var(--tone) 0%, transparent 45%); }
.mg-secopen__inner { position: relative; z-index: 4; padding-block: clamp(56px, 7vw, 104px); display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.mg-secopen__num { font-family: var(--f-head); font-size: clamp(120px, 18vw, 300px); line-height: 0.75; color: transparent; -webkit-text-stroke: 3px var(--on-tone, var(--ink)); }
.mg-secopen__title { font-family: var(--f-head); font-weight: 400; text-transform: uppercase; font-size: clamp(64px, 10vw, 180px); line-height: 0.82; max-width: 8ch; text-shadow: 6px 6px 0 var(--ink); }
[data-tone="yellow"] .mg-secopen__title, [data-tone="green"] .mg-secopen__title, [data-tone="amber"] .mg-secopen__title, [data-tone="phosphor"] .mg-secopen__title, [data-tone="sky"] .mg-secopen__title { text-shadow: 6px 6px 0 var(--paper); }
.mg-secopen .mg-deck { max-width: 44ch; }
.mg-secopen .mg-tag { background: var(--paper); color: var(--ink); border-color: var(--ink); }

.mg-callband { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; max-width: 860px; }
.mg-callband--box { margin-top: 64px; max-width: none; flex-direction: row; justify-content: space-between; align-items: center; border: var(--border); background: var(--c-secondary); color: var(--c-on-secondary); padding: 28px 32px; box-shadow: var(--shadow-hard); }

/* ---------- Community ---------- */
.mg-cycle { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 3px solid var(--tone); counter-reset: c; }
.mg-cycle li { padding: 22px; display: flex; flex-direction: column; gap: 10px; border: 1px solid rgba(255,255,255,.18); position: relative; }
.mg-cycle li b { font-family: var(--f-pixel); font-size: 14px; color: var(--tone); font-weight: 400; }
.mg-cycle li span { font-family: var(--f-head); font-size: clamp(24px, 2.4vw, 38px); line-height: 0.95; text-transform: uppercase; }
.mg-cycle li:nth-child(3) { grid-column: 2; grid-row: 2; }
.mg-cycle li:nth-child(4) { grid-column: 1; grid-row: 2; }
.mg-cycle li::after { position: absolute; z-index: 2; background: var(--tone); color: var(--ink); width: 28px; height: 28px; display: grid; place-items: center; font-weight: 900; }
.mg-cycle li:nth-child(1)::after { content: "\2192"; right: -14px; top: 50%; transform: translateY(-50%); }
.mg-cycle li:nth-child(2)::after { content: "\2193"; bottom: -14px; left: 50%; transform: translateX(-50%); }
.mg-cycle li:nth-child(3)::after { content: "\2190"; left: -14px; top: 50%; transform: translateY(-50%); }
.mg-cycle li:nth-child(4)::after { content: "\2191"; top: -14px; left: 50%; transform: translateX(-50%); }
.mg-wall--light { padding: 6px 12px 12px; }

/* ---------- Kit ---------- */
.mg-kithero { background: var(--ink); color: var(--paper); border-bottom: 3px solid var(--ink); position: relative; overflow: hidden; }
.mg-kithero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 75% 50%, color-mix(in srgb, var(--tone) 30%, transparent), transparent 55%), repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px); pointer-events: none; }
.mg-kithero__grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 5vw, 72px); align-items: center; padding-block: clamp(56px, 7vw, 112px); position: relative; }
.mg-kithero__copy { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.mg-kithero__copy .mg-display { font-size: clamp(56px, 8.4vw, 150px); line-height: 0.82; }
.mg-kithero__copy .mg-display em { font-style: normal; color: var(--tone); }
.mg-kithero__edition { border: 2px solid var(--paper); padding: 10px 12px 8px; font-size: 12px; }
.mg-kithero__object { position: relative; }
.mg-kitgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: var(--border); background: var(--white); }
.mg-kitcat { padding: 28px 26px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--paper-3); }
.mg-kitcat .mg-pixel { color: var(--c-primary); font-size: 14px; }
.mg-kitcat p { font-family: var(--f-body); font-size: 16px; line-height: 1.5; color: var(--ink-2); flex: 1; }
.mg-kitphoto { aspect-ratio: 4 / 5; border: 2px solid var(--gray-3); }
.mg-kitphoto img { position: absolute; inset: 0; }
.mg-kitfuture { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.mg-kitfuture__item { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 18px; border: var(--border); background: var(--white); }
.mg-kitfuture__item .mg-usb { width: min(100%, 220px); }
.mg-kitfuture__item strong { font-family: var(--f-head); font-weight: 400; font-size: 30px; text-transform: uppercase; line-height: 1; margin-top: 10px; }

/* ---------- Issues calendar ---------- */
.mg-issues-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 48px 28px; }
.mg-issues-grid__item { display: flex; flex-direction: column; gap: 14px; }
.mg-issues-grid__info { display: flex; flex-direction: column; gap: 10px; }
.mg-issues-grid__info p { font-family: var(--f-sub); font-size: 15px; line-height: 1.4; }
.mg-swatches { display: flex; gap: 4px; }
.mg-swatches i { width: 28px; height: 14px; border: 1px solid var(--ink); }

/* ---------- Store ---------- */
.mg-store-cover { position: relative; max-width: 380px; justify-self: center; width: 100%; }
.mg-store-cover > .mg-page { border: 2px solid var(--ink); box-shadow: 14px 14px 0 var(--ink); transform: rotate(2deg); }
.mg-store-cover__usb { position: absolute; left: -22%; bottom: -10%; width: 58%; transform: rotate(-10deg); filter: drop-shadow(10px 14px 0 rgba(11,11,15,.85)); }
.mg-products { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.mg-products .mg-product__foot { flex-wrap: wrap; gap: 10px; }
.mg-products .mg-product { padding: 20px 18px; }
.mg-products .mg-product__name { font-size: clamp(28px, 2.3vw, 38px); overflow-wrap: anywhere; }
.mg-compare td { font-family: var(--f-mono); text-align: center; }
.mg-compare thead th { text-align: center; }

/* ---------- 404 ---------- */
.mg-404 { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; min-height: 50vh; justify-content: center; }
.mg-404 .mg-display { color: var(--c-primary); text-shadow: 8px 8px 0 var(--ink); }

/* ---------- Image credits ---------- */
.mg-credits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 28px; }
.mg-credits__item { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: start; border-top: 3px solid currentColor; padding-top: 16px; }
.mg-credits__thumb { display: block; border: 2px solid var(--ink); }
.mg-credits__thumb .mg-img { aspect-ratio: 1; }
.mg-credits__body { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.mg-credits__body strong { font-family: var(--f-sub); font-weight: 700; }
.mg-credits__body dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; font-family: var(--f-mono); font-size: 12px; }
.mg-credits__body dt { text-transform: uppercase; opacity: 0.6; }
.mg-credits__body dd { margin: 0; overflow-wrap: anywhere; }
.mg-credits__body dd a { color: inherit; }
/* =========================================================
   Responsive (desktop/tablet first)
   ========================================================= */
@media (max-width: 1240px) {
  .mg-issues-row { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .mg-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mg-kitpromo { grid-template-columns: 1fr 1.4fr; }
  .mg-kitpromo__img { display: none; }
}
@media (max-width: 1100px) {
  .mg-hero__grid, .mg-issuehead__grid { grid-template-columns: 1fr 1.3fr; }
  .mg-chile__grid, .mg-hw { grid-template-columns: 1fr; }
  .mg-chile__collage { min-height: 520px; }
  .mg-article__layout { grid-template-columns: 220px minmax(0, 1fr); }
  .mg-tocpage { grid-template-columns: 1fr 1.2fr; }
  .mg-issues-grid { grid-template-columns: repeat(3, 1fr); }
  .mg-kitgrid { grid-template-columns: repeat(2, 1fr); }
  .mg-wall { grid-template-columns: repeat(2, 1fr); }
  .mg-wall > :nth-child(n) { margin-top: 0; }
}
@media (max-width: 860px) {
  .mg-hero__grid, .mg-issuehead__grid, .mg-pagehead__split.mg-wrap, .mg-kithero__grid, .mg-tocpage { grid-template-columns: 1fr; }
  .mg-hero__cover, .mg-issuehead__cover { max-width: 400px; }
  .mg-duo { grid-template-columns: 1fr; }
  .mg-duo__half + .mg-duo__half { border-left: 0; border-top: 3px solid var(--ink); }
  .mg-duo__inner { max-width: none; }
  .mg-issue-strip { grid-template-columns: repeat(2, 1fr); }
  .mg-article__layout { grid-template-columns: 1fr; }
  .mg-article__aside { position: static; flex-direction: row; flex-wrap: wrap; }
  .mg-article__mini { width: 200px; }
  .mg-authorcard { flex: 1; min-width: 220px; }
  .mg-tocpage__page { position: static; max-width: 420px; }
  .mg-secopen__img { inset: 0; opacity: 0.45; }
  .mg-store-cover { max-width: 300px; margin-left: 20%; }
  .mg-kitpromo { grid-template-columns: 1fr; }
  .mg-callband--box { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 720px) {
  .mg-issue-strip, .mg-wall, .mg-kitgrid, .mg-kitfuture { grid-template-columns: 1fr; }
  .mg-issues-row, .mg-issues-grid, .mg-products { grid-template-columns: repeat(2, 1fr); }
  .mg-hero__cover { padding-right: 18px; }
  .mg-hero__cover .mg-sticker--burst { right: -4px !important; top: -20px !important; width: 92px; height: 92px; font-size: 12px; }
  .mg-hero__lines a { grid-template-columns: 1fr auto; }
  .mg-hero__lines small { grid-column: 1 / -1; }
  .mg-hero__stats dd { font-size: 30px; }
  .mg-chile__collage { min-height: 360px; }
  .mg-toclist a { grid-template-columns: 56px 1fr auto; }
  .mg-toclist__web { display: none; }
  .mg-cycle { grid-template-columns: 1fr; }
  .mg-cycle li:nth-child(n) { grid-column: auto; grid-row: auto; }
  .mg-cycle li::after { display: none; }
  .mg-article__hero > .mg-img { aspect-ratio: 4 / 3; }
}
@media (max-width: 480px) {
  .mg-issues-row, .mg-issues-grid, .mg-products { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .mg-manifesto__track { animation: none; }
}
