/* Media kit page: masthead, stat tiles, charts, benchmark cards, case study.
   Layout is mobile-first friendly: grids collapse at 720px and 640px. */

.doc {
  padding: 32px 0 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.sheet {
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 48px 52px 44px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  min-width: 0;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
@media (max-width: 640px) {
  .doc { padding-top: 16px; gap: 20px; }
  .sheet { padding: 26px 18px 26px; gap: 28px; }
}

/* masthead */
.masthead {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--ink);
}
.eyebrow .yt { margin-right: 6px; width: 20px; height: 20px; vertical-align: -5px; }
.contact .link { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; color: inherit; }
.contact .link .yt { width: 16px; height: 16px; }
.contact a { color: var(--ink-2); }
.eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.masthead h1 {
  font-size: 52px;
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.masthead h1 span { color: var(--accent); }
.lede {
  margin-top: 14px;
  max-width: 56ch;
  color: var(--ink-2);
  font-size: 16px;
}
.contact {
  text-align: right;
  font-size: 13.5px;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.contact strong { color: var(--ink); font-weight: 600; }
.masthead.with-avatar {
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  row-gap: 18px;
}
.masthead.with-avatar .avatar { grid-row: 1; grid-column: 1; }
.masthead.with-avatar .title-block { grid-row: 1; grid-column: 2; }
.masthead.with-avatar .contact { grid-row: 1; grid-column: 3; align-self: end; }
.masthead.with-avatar .lede-wide {
  grid-row: 2;
  grid-column: 1 / 4;
  margin-top: 0;
  max-width: none;
}
.avatar {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  padding: 4px;
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent), 0 0 0 4px var(--surface);
  align-self: start;
  margin-right: 4px;
}
.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
@media (max-width: 720px) {
  .masthead, .masthead.with-avatar { grid-template-columns: 1fr; grid-template-rows: none; align-items: start; }
  .masthead.with-avatar .avatar, .masthead.with-avatar .title-block,
  .masthead.with-avatar .contact, .masthead.with-avatar .lede-wide { grid-row: auto; grid-column: 1; }
  .masthead h1 { font-size: 40px; }
  .contact { text-align: left; }
  .contact .link { justify-content: flex-start; }
  .avatar { width: 104px; height: 104px; }
}
@media (max-width: 400px) {
  .masthead h1 { font-size: 34px; }
}

/* stat tiles */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.stat {
  padding: 18px 20px 18px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--hairline); }
.stat .label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stat .value {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat .note { font-size: 12.5px; color: var(--ink-2); }
.stat.hero .value { font-size: 44px; color: var(--accent); }
@media (max-width: 720px) {
  .stats, .case-stats { grid-template-columns: repeat(2, 1fr); }
  .stats .stat:nth-child(3), .case-stats .stat:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--hairline); }
  .stats .stat:nth-child(4), .case-stats .stat:nth-child(4) { border-top: 1px solid var(--hairline); }
  .stat .value { font-size: 30px; }
  .stat.hero .value { font-size: 38px; }
}

/* sections */
.section { display: flex; flex-direction: column; gap: 16px; min-width: 0; scroll-margin-top: calc(var(--header-h) + 16px); }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  flex-wrap: wrap;
}
.section h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section h2 + .sub { font-size: 13.5px; color: var(--muted); }
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; gap: 28px; } }

.chart { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.chart h3 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
}
.chart h3 small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis-text, .chart .tick-text { font-family: var(--font-body); fill: var(--ink-2); font-size: 12.5px; }
.chart .tick-text { fill: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.chart .val-text { font-family: var(--font-body); fill: var(--ink); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--hairline); stroke-width: 1; }
.chart .base { stroke: var(--baseline); stroke-width: 1; }
.chart .bar { transition: opacity 120ms; }
.chart .bar:hover { opacity: 0.85; }
.chart .hit { fill: transparent; }

.legend {
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-2);
}
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }

.callouts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.callouts.stack { grid-template-columns: 1fr; align-content: start; }
.callout {
  border-left: 3px solid var(--accent);
  padding: 2px 0 2px 14px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.callout strong { color: var(--ink); font-weight: 600; }
@media (max-width: 720px) { .callouts { grid-template-columns: 1fr; gap: 14px; } }

/* benchmark block */
.bench {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.bench-card {
  background: var(--surface-2);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.bench-card .fmt {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
}
.bench-card .fmt i { width: 10px; height: 10px; border-radius: 50%; background: var(--series-1); display: inline-block; }
.bench-card .fmt i.long { background: var(--series-2); }
.bench-card .big {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.bench-card .big small {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  margin-left: 8px;
}
.bench-card dl {
  margin: 4px 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  row-gap: 4px;
  font-size: 13px;
}
.bench-card dt { color: var(--muted); }
.bench-card dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 500; }
@media (max-width: 640px) {
  .bench { grid-template-columns: 1fr; gap: 14px; }
  .bench-card .big { font-size: 34px; }
  .bench-card .big small { display: block; margin: 6px 0 0; }
}

/* formats table: scrolls sideways on narrow screens instead of breaking the page */
table.formats {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.formats th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 12px 10px 0;
  border-bottom: 1px solid var(--ink);
}
table.formats td {
  padding: 11px 12px 11px 0;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
table.formats td:first-child { font-weight: 600; white-space: nowrap; }
table.formats td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.formats td.rate { color: var(--ink-2); white-space: nowrap; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
@media (max-width: 720px) { #daily-chart svg { min-width: 640px; } }

.highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.hl { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--hairline); padding-top: 12px; }
.hl .views { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.hl .t { font-size: 13.5px; font-weight: 500; }
.hl .m { font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) { .highlights { grid-template-columns: 1fr; gap: 10px; } }

.foot {
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--hairline);
  padding-top: 14px;
  max-width: 80ch;
}

/* case study */
.case-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 36px;
  align-items: start;
}
.case-hero .video {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.case-hero .video h2 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.case-hero .meta { font-size: 13.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.case-hero .meta b { color: var(--ink); font-weight: 600; }
.case-hero .meta a { overflow-wrap: anywhere; }
.case-hero .summary { margin-top: 8px; color: var(--ink-2); max-width: 52ch; }
.headline {
  background: var(--surface-2);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.headline .label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.headline .num {
  font-family: var(--font-display);
  font-size: 58px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.headline .cmp { font-size: 14px; color: var(--ink-2); }
.headline .cmp strong { color: var(--ink); font-weight: 600; }
@media (max-width: 720px) {
  .case-hero { grid-template-columns: 1fr; gap: 20px; }
  .headline .num { font-size: 48px; }
  .headline { padding: 18px 18px; }
}

.case-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.case-stats .stat .value { font-size: 28px; }

/* contact block at the end of the page */
.contact-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.contact-card h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.contact-card p { color: var(--ink-2); max-width: 56ch; margin-top: 6px; }
.contact-card .actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) { .contact-card { grid-template-columns: 1fr; } }

/* tooltip */
#tip {
  position: fixed;
  pointer-events: none;
  background: var(--tip-bg);
  color: var(--tip-ink);
  font-size: 12.5px;
  line-height: 1.35;
  padding: 7px 10px;
  border-radius: 4px;
  z-index: 30;
  max-width: 240px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
#tip b { font-weight: 600; }
#tip[hidden] { display: none; }

details.data {
  font-size: 12.5px;
  color: var(--ink-2);
}
details.data summary { cursor: pointer; color: var(--muted); }
details.data summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
details.data .table-wrap { margin-top: 8px; }
details.data table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
details.data td, details.data th { padding: 3px 14px 3px 0; text-align: left; border-bottom: 1px solid var(--hairline); white-space: nowrap; }

/* print: two Letter pages for the kit, one for the case study */
@media print {
  @page { size: Letter; margin: 0.35in; }
  body { font-size: 11.5px; line-height: 1.4; }
  .wrap { max-width: none; padding: 0; }
  .doc { padding: 0; gap: 0; }
  .sheet { box-shadow: none; padding: 12px 24px 6px; break-after: page; display: block; }
  #case-study { break-after: auto; }
  #contact { display: none; }
  .sheet > * + * { margin-top: 18px; }
  .section { display: block; }
  .section > * + * { margin-top: 8px; }
  .masthead { padding-bottom: 10px; }
  .masthead h1 { font-size: 32px; }
  .lede { font-size: 13px; }
  .stat { padding-top: 12px; padding-bottom: 12px; }
  .stat .value { font-size: 28px; }
  .stat.hero .value { font-size: 36px; }
  .section, .stats, .case-stats, .highlights, .bench, .case-hero, .callouts { break-inside: avoid; }
  .section-head { break-after: avoid; }
  .section h2 { font-size: 19px; }
  .two-col { gap: 28px; }
  .bench-card { padding: 14px 16px; }
  .bench-card .big { font-size: 32px; }
  table.formats { min-width: 0; }
  table.formats td { padding: 7px 10px 7px 0; }
  .headline { padding: 12px 16px; }
  .headline .num { font-size: 44px; }
  .case-hero { gap: 24px; }
  .case-hero .video h2 { font-size: 24px; }
  .case-hero .summary { font-size: 12px; }
  .case-stats .stat { padding-top: 9px; padding-bottom: 9px; }
  .case-stats .stat .value { font-size: 24px; }
  .callout { font-size: 11.5px; line-height: 1.4; }
  .callouts { gap: 14px; }
  #daily-chart svg { width: 58%; }
  .foot { break-inside: avoid; font-size: 10.5px; padding-top: 8px; }
  details.data, #tip { display: none; }
  #daily-chart svg { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .chart .bar { transition: none; }
}
