/*
 * The report: "Монголын YouTube-ийн өнөөгийн байдал".
 *
 * Loaded after app.css and built on its tokens, fonts and grid, so the report
 * belongs to the same publication as the rest of the site. What is added here
 * is only what a long document needs and a web page does not: a masthead, a
 * reading measure, pull quotes, key figures, captioned figures and a method
 * section, plus print rules.
 *
 * The previous version was cream paper, a terracotta accent and an uppercase
 * letterspaced kicker over a serif: the most generic "editorial" look there is,
 * and nothing about it said Mongolia or this association. Replaced wholesale.
 */

.masthead, .doc {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------------------------------------------------------------- masthead */

.masthead { position: relative; padding-block: clamp(48px, 9vw, 120px) clamp(56px, 7vw, 96px); margin-bottom: 64px; }
.masthead::after {
  content: ""; position: absolute; pointer-events: none;
  right: var(--gutter); bottom: clamp(56px, 7vw, 96px);
  width: clamp(160px, 22vw, 340px); aspect-ratio: 1;
  background: url(/mark.svg) center / contain no-repeat;
}
.masthead > * { position: relative; }
@media (max-width: 1100px) { .masthead::after { display: none; } }
.kicker { margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 15px; color: var(--muted); }
.kicker .issue { color: var(--hue-ink); font-weight: 600; }
.masthead h1 {
  margin: 0; max-width: 17ch;
  font: 300 clamp(46px, 7.4vw, 104px)/1 var(--serif);
  letter-spacing: -0.026em;
  color: var(--text);
}
.standfirst {
  margin: 34px 0 0; max-width: 60ch;
  font: 400 clamp(19px, 1.9vw, 24px)/1.55 var(--serif);
  color: var(--muted);
}
.byline { margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: 14px; color: var(--dim); }

/* ------------------------------------------------------------ key figures */

.doc { padding-block: 0 96px; }

.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 32px clamp(28px, 4vw, 56px);
  padding-block: 40px 0;
  margin: 0 0 40px;
}
.figures b {
  display: block;
  font: 300 clamp(34px, 3.4vw, 46px)/1.05 var(--serif);
  letter-spacing: -0.015em;
  color: var(--c, var(--text));
  font-variant-numeric: lining-nums tabular-nums;
}
.figures > :nth-child(5n+1) { --c: var(--coral-ink); }
.figures > :nth-child(5n+2) { --c: var(--teal-ink); }
.figures > :nth-child(5n+3) { --c: var(--cobalt-ink); }
.figures > :nth-child(5n+4) { --c: var(--magenta-ink); }
.figures > :nth-child(5n+5) { --c: var(--saffron-ink); }
.figures span { display: block; margin-top: 10px; max-width: 26ch; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* ---------------------------------------------------------------- chapters */

section.chapter { padding-block: 96px 0; }
section.chapter > h2 {
  margin: 0 0 32px; padding-top: 36px; max-width: 22ch;
  font: 300 clamp(32px, 3.8vw, 52px)/1.08 var(--serif);
  letter-spacing: -0.02em;
  position: relative;
}
/* Each chapter opens with a short bar in the next brand ink. */
section.chapter > h2::before {
  content: ""; position: absolute; top: 0; left: 0; width: 72px; height: 6px; background: var(--c, var(--coral));
}
section.chapter:nth-of-type(5n+1) > h2 { --c: var(--saffron); }
section.chapter:nth-of-type(5n+2) > h2 { --c: var(--magenta); }
section.chapter:nth-of-type(5n+3) > h2 { --c: var(--coral); }
section.chapter:nth-of-type(5n+4) > h2 { --c: var(--teal); }
section.chapter:nth-of-type(5n+5) > h2 { --c: var(--cobalt); }
section.chapter p { max-width: 64ch; margin: 0 0 22px; font: 400 19px/1.72 var(--serif); color: var(--text); }
section.chapter p.lead { font-size: clamp(20px, 1.9vw, 23px); line-height: 1.6; color: var(--text); }
section.chapter strong { font-weight: 600; }

/* A pull quote is the one sentence per chapter the reader must carry away, so
   it takes the gold rule, and nothing else in the chapter does. */
.pull {
  margin: 44px 0; padding-left: 28px; max-width: 34ch;
  border-left: 6px solid var(--coral);
  font: 300 clamp(24px, 2.5vw, 32px)/1.35 var(--serif);
  letter-spacing: -0.008em;
  color: var(--text);
}
.pull strong { font-weight: 600; }

/* ----------------------------------------------------------- leader boards */

.two-up { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 56px clamp(40px, 6vw, 96px); margin-top: 48px; }
.two-up h3, .cats h3 {
  margin: 0 0 4px; padding-bottom: 14px;
  font: 400 clamp(21px, 1.9vw, 26px)/1.25 var(--serif);
  color: var(--text);
  border-bottom: 3px solid var(--hue);
}

table.board { width: 100%; border-collapse: collapse; font-size: 15px; }
table.board th {
  position: static; background: none;
  text-align: left; padding: 12px 8px 10px;
  font-size: 13px; font-weight: 500; color: var(--dim);
  border-bottom: 1px solid var(--line);
}
table.board td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.board .r { width: 40px; text-align: right; padding-right: 14px; font: 300 20px/1 var(--serif); color: var(--dim); }
table.board .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
table.board th.n { font-family: var(--sans); }
table.board a { color: var(--text); text-decoration: none; font-weight: 500; }
table.board a:hover { color: var(--accent); text-decoration: underline; }
table.board .meta { margin-top: 2px; font-size: 13px; color: var(--muted); }
table.board img.av { width: 32px; height: 32px; border-radius: 50%; display: block; background: var(--panel-2); }

.cats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 56px clamp(32px, 5vw, 72px);
  margin-top: 48px;
}
.cats .meta { margin: 10px 0 12px; font-size: 14px; color: var(--muted); }
.cats ol { margin: 0; padding: 0; list-style: none; counter-reset: c; }
.cats li {
  counter-increment: c;
  display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: baseline;
  padding-block: 8px; border-bottom: 1px solid var(--line); font-size: 15px;
}
.cats li::before { content: counter(c); font: 300 17px/1 var(--serif); color: var(--dim); }
.cats a { color: var(--text); text-decoration: none; }
.cats a:hover { color: var(--accent); text-decoration: underline; }
.cats .n { color: var(--muted); font-variant-numeric: tabular-nums lining-nums; }

/* ----------------------------------------------------------------- figures */

.figure { margin: 56px 0 8px; }
.figure .cap { margin: 16px 0 0; max-width: 64ch; font-size: 14px; line-height: 1.6; color: var(--muted); }

/* ------------------------------------------------------------------ method */

.method {
  margin-top: 120px; padding-top: 40px;
  border-top: 6px solid var(--teal);
  display: grid; grid-template-columns: minmax(200px, 4fr) minmax(0, 8fr); gap: 16px clamp(32px, 5vw, 80px);
}
.method h2 { margin: 0; grid-row: 1 / span 10; font: 300 clamp(28px, 2.8vw, 36px)/1.15 var(--serif); letter-spacing: -0.012em; }
.method p { grid-column: 2; margin: 0 0 16px; max-width: 64ch; font-size: 16px; line-height: 1.7; color: var(--muted); }
.method p strong { color: var(--text); font-weight: 600; }

@media (max-width: 760px) {
  .masthead { padding-block: 40px 36px; }
  section.chapter { padding-block: 64px 0; }
  .method { grid-template-columns: 1fr; }
  .method h2, .method p { grid-column: auto; grid-row: auto; }
}

@media print {
  nav.top, .subnav, footer.site, .expand { display: none; }
  body { background: #fff; }
  body::before, .masthead::after { display: none; }
  .figures, .figure, .pull { break-inside: avoid; }
  section.chapter { break-inside: avoid-page; }
}

/* Keeps a figure and its case suffix ("36.3%-ийг") on one line. */
.nw { white-space: nowrap; }
