/* The Toronto Wire — newsprint + teletype */
:root {
  --paper: #f4f1e9;
  --paper-2: #ebe6da;
  --ink: #141414;
  --ink-2: #3d3b37;
  --muted: #7a766d;
  --rule: #141414;
  --hair: #cfc8b8;
  --red: #d3261c;
  --red-ink: #a81b13;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  /* faint newsprint grain */
  background-image: radial-gradient(rgba(20, 20, 20, 0.035) 1px, transparent 1px);
  background-size: 3px 3px;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red-ink); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* utility bar */
.utility { font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--hair); }
.utility .wrap { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.util-links a { margin-left: 18px; }

/* masthead */
.masthead { text-align: center; padding: 22px 0 14px; }
.brand { display: inline-flex; flex-direction: column; align-items: center; line-height: .82; }
.brand-the { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 20px; letter-spacing: .02em; margin-bottom: 4px; color: var(--ink-2); }
.brand-word { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(56px, 10vw, 118px); letter-spacing: .01em; }
.brand-wire { color: var(--red); margin-left: .12em; position: relative; }
.brand-wire::after { /* the wire */
  content: ""; position: absolute; left: 0; right: 0; bottom: -.05em; height: .045em; background: var(--red);
}
.brand:hover { color: var(--ink); }
.brand-tag { margin: 14px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); }

/* section nav */
.sections { border-top: 3px solid var(--rule); border-bottom: 1px solid var(--rule); }
.sections .wrap { display: flex; justify-content: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.sections a { font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: .08em; text-transform: uppercase; padding: 11px 16px 10px; white-space: nowrap; border-bottom: 3px solid transparent; }
.sections a[aria-current] { border-bottom-color: var(--red); }

/* ticker */
.ticker { background: var(--ink); color: #f4f1e9; font-family: var(--mono); font-size: 13px; }
.ticker-row { display: flex; align-items: stretch; height: 40px; padding: 0; }
.ticker-label { flex: none; display: flex; align-items: center; gap: 9px; padding: 0 16px 0 24px; background: var(--red); text-transform: uppercase; letter-spacing: .12em; font-weight: 600; font-size: 11.5px; }
.ticker-label i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.6s steps(2, start) infinite; }
.ticker-track { flex: 1; overflow: hidden; position: relative; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-move { display: flex; width: max-content; height: 100%; align-items: center; animation: tick 70s linear infinite; }
.ticker-track:hover .ticker-move { animation-play-state: paused; }
.ticker-move a { padding: 0 28px; white-space: nowrap; border-right: 1px solid #3a3a3a; }
.ticker-move a:hover { color: #fff; text-decoration: underline; }
.ticker-move time { color: #ff6b5f; margin-right: 10px; }
@keyframes tick { to { transform: translateX(-50%); } }
@keyframes blink { to { visibility: hidden; } }

/* shared bits */
.kicker { display: inline-block; font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--red-ink); margin-bottom: 8px; }
.meta { font-family: var(--mono); font-size: 11.5px; letter-spacing: .03em; color: var(--muted); margin: 10px 0 0; }
.rule-h { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 22px; margin: 0 0 22px; display: flex; align-items: center; gap: 14px; }
.rule-h::after { content: ""; flex: 1; border-top: 3px double var(--rule); }
.rail-h { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 20px; margin: 0 0 6px; padding-bottom: 8px; border-bottom: 3px solid var(--rule); }

/* front page */
main { padding-bottom: 40px; }
.front { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); gap: 36px; padding: 30px 0 34px; border-bottom: 1px solid var(--rule); }
.lead-img { display: block; overflow: hidden; }
.lead-img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; filter: saturate(.92) contrast(1.03); transition: transform .6s ease; }
.lead-img:hover img { transform: scale(1.02); }
.lead-body { padding-top: 18px; }
.lead h2 { font-family: var(--serif); font-weight: 800; font-size: clamp(32px, 4.2vw, 52px); line-height: 1.02; letter-spacing: -.015em; margin: 0; font-variation-settings: "opsz" 72; }
.lead-dek { font-size: 20px; line-height: 1.4; color: var(--ink-2); margin: 14px 0 0; max-width: 46em; }

.latest ol { list-style: none; margin: 0; padding: 0; counter-reset: l; }
.latest li { display: grid; grid-template-columns: 30px 1fr; column-gap: 8px; padding: 13px 0; border-bottom: 1px solid var(--hair); counter-increment: l; }
.latest li::before { content: counter(l, decimal-leading-zero); grid-row: span 3; font-family: var(--display); font-weight: 900; font-size: 22px; color: var(--red); line-height: 1; padding-top: 2px; }
.latest time { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.latest a { font-weight: 600; font-size: 17px; line-height: 1.22; margin: 2px 0; }
.rail-more { display: inline-block; margin-top: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--red-ink); }
.latest span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--red-ink); }

.row-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 30px 0; border-bottom: 1px solid var(--rule); }
.row-three .card { padding: 0 24px; border-left: 1px solid var(--hair); }
.row-three .card:first-child { padding-left: 0; border-left: 0; }
.row-three .card:last-child { padding-right: 0; }

.card-img { display: block; overflow: hidden; margin-bottom: 14px; }
.card-img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; filter: saturate(.9); transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.03); }
.card h3 { font-family: var(--serif); font-weight: 700; font-size: 23px; line-height: 1.12; letter-spacing: -.01em; margin: 0; }
.card-dek { margin: 8px 0 0; color: var(--ink-2); font-size: 16px; line-height: 1.42; }

.more { padding: 32px 0 8px; }
.more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.card-row { display: grid; grid-template-columns: 180px 1fr; gap: 18px; padding: 18px 0; border-top: 1px solid var(--hair); }
.card-row .card-img { margin: 0; }
.card-row h3 { font-size: 21px; }
.card-row .card-dek { font-size: 15px; }

.about-strip { margin-top: 26px; border: 1px solid var(--rule); border-top: 6px solid var(--red); background: var(--paper-2); padding: 16px 20px; }
.about-strip p { margin: 0; font-size: 16px; }
.about-strip a { color: var(--red-ink); text-decoration: underline; text-underline-offset: 2px; }

/* section pages */
.section-head { padding: 34px 0 20px; border-bottom: 3px double var(--rule); margin-bottom: 4px; }
.section-head h1 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(48px, 7vw, 84px); line-height: .9; margin: 0; letter-spacing: .01em; }
.section-head p { margin: 10px 0 0; font-size: 19px; color: var(--ink-2); font-style: italic; }
.empty { grid-column: 1 / -1; padding: 30px 0; font-size: 18px; }
.empty a { color: var(--red-ink); text-decoration: underline; }

/* article */
.story { max-width: 760px; margin: 0 auto; padding: 38px 0 10px; }
.story-head h1 { font-family: var(--serif); font-weight: 800; font-size: clamp(34px, 5vw, 54px); line-height: 1.04; letter-spacing: -.018em; margin: 0; font-variation-settings: "opsz" 72; }
.story-dek { font-size: 21px; line-height: 1.42; color: var(--ink-2); margin: 16px 0 0; font-style: italic; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 0; margin: 20px 0 0; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--hair); font-family: var(--mono); font-size: 12px; letter-spacing: .03em; color: var(--ink-2); }
.byline span + span::before { content: "·"; margin: 0 10px; color: var(--muted); }
.story-fig { margin: 26px -60px 0; }
.story-fig img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.story-fig figcaption { margin: 10px 60px 0; font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.credit { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 6px; }
.credit a { text-decoration: underline; text-underline-offset: 2px; }
.story-body { font-size: 19.5px; line-height: 1.62; margin-top: 28px; }
.story-body p { margin: 0 0 1.05em; }
.story-body .lede::first-letter { float: left; font-family: var(--display); font-weight: 900; font-size: 4.3em; line-height: .78; padding: .06em .08em 0 0; color: var(--red); }
.story-body h2 { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: 24px; line-height: 1.1; margin: 1.6em 0 .55em; }
.story-body ul { margin: 0 0 1.1em; padding-left: 1.1em; }
.story-body li { margin: .3em 0; }
.story-body li::marker { color: var(--red); }
.story-body a { color: var(--red-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sources-box { margin: 36px 0 0; padding: 18px 22px 8px; background: var(--paper-2); border: 1px solid var(--rule); border-top: 6px solid var(--ink); font-size: 15.5px; line-height: 1.5; }
.sources-box h2 { margin: 0 0 8px; font-size: 18px; }
.sources-box ol { padding-left: 1.2em; margin: 10px 0 12px; }
.sources-box li { margin: .35em 0; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; }
.static .story-body ul { padding-left: 1.2em; }
.related { padding: 34px 0 0; border-top: 3px double var(--rule); margin-top: 30px; }
.related .row-three { border-bottom: 0; padding-top: 0; }
.related .card h3 { font-size: 20px; }

/* footer */
.site-foot { background: var(--ink); color: #d9d4c7; padding: 40px 0 26px; margin-top: 30px; }
.site-foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; }
.brand-word.small { font-size: 44px; color: #f4f1e9; }
.foot-brand p { max-width: 30em; font-size: 15px; color: #b9b3a5; }
.foot-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.foot-cols h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #ff6b5f; margin: 6px 0 10px; }
.foot-cols a { display: block; padding: 3px 0; font-size: 15px; }
.foot-cols a:hover, .foot-small a:hover { color: #fff; }
.foot-small { grid-column: 1 / -1; border-top: 1px solid #333; padding-top: 16px; margin: 6px 0 0; font-family: var(--mono); font-size: 11px; color: #8d877a; }
.foot-small a { text-decoration: underline; }

/* load-in: the wire draws itself under the masthead */
@media (prefers-reduced-motion: no-preference) {
  .masthead .brand-wire::after { transform-origin: left; animation: draw .9s .2s cubic-bezier(.2, .7, .2, 1) both; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-move { animation: none; }
  .ticker-label i { animation: none; }
}
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* responsive */
@media (max-width: 980px) {
  .front { grid-template-columns: 1fr; gap: 26px; }
  .story-fig { margin-left: 0; margin-right: 0; }
  .story-fig figcaption { margin-left: 0; margin-right: 0; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .utility .wrap > span:first-child { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .util-links { flex: none; }
  .util-links a[href='/feed.xml'] { display: none; }
  .util-links a { margin-left: 12px; }
  .masthead { padding: 16px 0 10px; }
  .sections .wrap { justify-content: flex-start; }
  .sections a { font-size: 15px; padding: 10px 11px 9px; }
  .ticker-label { padding: 0 12px 0 16px; font-size: 10.5px; }
  .row-three { grid-template-columns: 1fr; padding: 20px 0; }
  .row-three .card { padding: 18px 0; border-left: 0; border-top: 1px solid var(--hair); }
  .row-three .card:first-child { border-top: 0; padding-top: 0; }
  .more-grid { grid-template-columns: 1fr; }
  .card-row { grid-template-columns: 112px 1fr; gap: 14px; }
  .card-row h3 { font-size: 18px; }
  .card-row .card-dek { display: none; }
  .story { padding-top: 26px; }
  .byline { gap: 4px 16px; }
  .byline span + span::before { content: none; }
  .story-body { font-size: 18px; }
  .site-foot .wrap { grid-template-columns: 1fr; }
}
