/* Magazine: an editorial issue. Thick rules, the name set huge as the masthead,
   a cover story, numbered stories in ruled columns, a letter with a drop cap. */
.mg { max-width: 1180px; margin: 0 auto; padding: 40px 28px 120px; }
.is-preview .mg { padding-top: 20px; }

/* ---- masthead ---- */
.mg-rule {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 6px 0;
  border-top: 3px solid var(--text); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
/* The dateline is the page's meta line, set in the rule's small caps. */
.mg-meta { font-size: inherit; line-height: 1.6; color: inherit; }
.mg-meta .maker-no:hover { color: var(--text); }
.mg-issue { margin-left: auto; color: var(--text); white-space: nowrap; }
.mg-rule .share { width: 34px; height: 34px; }
.mg-title {
  margin: 12px 0 16px; font-size: clamp(52px, 11.5vw, 156px); line-height: .88; font-weight: 800; letter-spacing: -.055em;
}
.mg-rule-b { border-top-width: 1px; border-bottom: 1px solid var(--line); text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 13px; }
.mg-live { margin-left: auto; white-space: nowrap; }
/* Nothing on the rule under the name: one hairline, not an empty band. */
.mg-rule-b:empty { min-height: 0; padding: 0; border-bottom: 0; }

/* ---- the cover story ---- */
.mg-cover {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 40px; align-items: center;
  margin-top: 36px; color: var(--text); text-decoration: none;
}
.mg-cover-shot { border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.mg-cover-text { display: grid; gap: 14px; align-content: center; min-width: 0; }
.mg-kicker { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.mg-headline { font-size: clamp(38px, 5.2vw, 68px); line-height: 1; font-weight: 800; letter-spacing: -.045em; text-decoration: underline transparent 3px; text-underline-offset: 8px; transition: text-decoration-color .25s; }
.mg-standfirst { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.45; color: color-mix(in srgb, var(--text) 88%, var(--muted)); }
.mg-cover-details { font-size: 15px; line-height: 1.6; color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.mg-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; font-weight: 600; }
.mg-byline .rev { color: var(--text); font-size: 13px; }
@media (hover: hover) {
  a.mg-cover:hover .mg-headline, a.mg-story:hover .mg-story-h { text-decoration-color: var(--accent); }
  a.mg-cover:hover .shot > img, a.mg-story:hover .shot > img { transform: scale(1.03); }
}

/* ---- in this issue ---- */
.mg-section { margin: 0 0 4px; padding-top: 10px; border-top: 3px solid var(--text); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.mg-issue-list { margin-top: 72px; }
/* Ruled columns: each story draws its left and top rule; the grid clips the outer ones. */
.mg-stories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-left: -25px; overflow: hidden; }
.mg-story {
  display: flex; flex-direction: column; gap: 10px; min-width: 0; margin: -1px 0 0 -1px; padding: 22px 24px 30px 26px;
  border-left: 1px solid var(--line); border-top: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.mg-num { font-size: 46px; line-height: 1; font-weight: 800; letter-spacing: -.05em; color: var(--accent); font-variant-numeric: tabular-nums; }
.mg-story-shot { border-radius: var(--r-md); border: 1px solid var(--line); }
.mg-story-h { font-size: 24px; line-height: 1.12; font-weight: 750; letter-spacing: -.025em; text-decoration: underline transparent 2px; text-underline-offset: 5px; transition: text-decoration-color .25s; }
.mg-dek { font-size: 15.5px; line-height: 1.5; color: color-mix(in srgb, var(--text) 82%, var(--muted)); }
.mg-story-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; }
.mg-story-foot .rev, .mg-story-foot .rev-group { margin-left: auto; color: var(--text); }

/* ---- the back page: the letter and the sidebar ---- */
.mg-back { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 56px; margin-top: 72px; align-items: start; }
.mg-back-solo { grid-template-columns: minmax(0, 760px); }
.mg-letter { display: grid; gap: 18px; min-width: 0; }
.mg-letter-id { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.mg-sign { font-size: 19px; font-weight: 700; font-style: italic; letter-spacing: -.01em; }
.mg-bio { font-size: 18px; line-height: 1.7; }
.mg-bio > p:first-child::first-letter { float: left; margin: 7px 10px 0 0; font-size: 4.1em; line-height: .78; font-weight: 800; color: var(--accent); }
.mg-socials { gap: 8px; }
.mg-socials a { width: auto; height: 36px; padding: 0 13px; gap: 7px; display: inline-flex; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--text); text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); }

.mg-side { display: grid; gap: 28px; min-width: 0; }
.mg-quote { margin: 0; padding-top: 12px; border-top: 3px solid var(--text); }
.mg-quote blockquote { margin: 0; display: flex; align-items: center; gap: 10px; font-size: clamp(48px, 6vw, 76px); line-height: 1.05; font-weight: 800; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.mg-quote figcaption { margin-top: 6px; font-size: 14.5px; color: var(--muted); }
.mg-sub { padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.mg-sub .sub-h { font-size: 19px; letter-spacing: -.015em; }
.mg-empty { margin-top: 36px; }

@media (max-width: 960px) {
  .mg-stories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mg-back { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
@media (max-width: 720px) {
  .mg { padding: 24px 16px 112px; }
  .mg-rule:not(.mg-rule-b) { font-size: 11px; letter-spacing: .1em; }
  .mg-title { margin: 8px 0 12px; font-size: clamp(44px, 15vw, 76px); }
  .mg-cover { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 24px; }
  .mg-headline { font-size: clamp(34px, 10vw, 46px); }
  .mg-issue-list, .mg-back { margin-top: 48px; }
  .mg-stories { grid-template-columns: minmax(0, 1fr); margin-left: 0; }
  .mg-story { margin-left: 0; padding: 20px 0 26px; border-left: 0; }
  .mg-num { font-size: 38px; }
  .mg-story-h { font-size: 22px; }
  .mg-bio { font-size: 17px; }
}

/* Custom links as a ruled row of buttons. */
.mg-links { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 24px; }
