/* The Alnadi Dispatch — Mohammed Alnadi's portfolio as a broadsheet front page.
   Hand-written, no build step. */

:root {
  --paper: #e7e5de;
  --plate: #efede7;
  --ink: #151515;
  --soft: #4d4a44;
  --red: #c4161c;
  --hair: rgba(21, 21, 21, .32);
  --black: "UnifrakturCook", "Old English Text MT", "Times New Roman", serif;
  --hed: "Playfair Display", "Times New Roman", Times, serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --cond: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --col: clamp(1rem, 1.7vw, 1.6rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  color: var(--ink);
  font: 400 1.02rem/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 10;
  background: var(--ink); color: var(--paper); padding: .5rem .9rem;
  font: 600 .85rem var(--cond); letter-spacing: .08em; text-transform: uppercase;
}
.skip:focus { left: 0; }

.page { max-width: 1340px; margin: 0 auto; padding: 0 clamp(.9rem, 3vw, 2.5rem); }

/* small condensed caps used for kickers, labels, datelines */
.kicker, .label, .byline, .dateline, .index, .ear, .strap, .jump, .tools,
.sec-flag p, .bureau-head p, .ad-label, .ad-kicker, .ad-sub, .links, .colophon,
#regrow, .inside i {
  font-family: var(--cond);
  text-transform: uppercase;
  letter-spacing: .09em;
}

/* ───────── masthead ───────── */

.mast { padding-top: clamp(.9rem, 2vw, 1.6rem); text-align: center; }

.ears {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr) 9.5rem;
  align-items: center;
  gap: clamp(.8rem, 2vw, 2rem);
}
.ear {
  display: flex; flex-direction: column; justify-content: center; gap: .15rem;
  min-height: 4.6rem; padding: .5rem .6rem;
  border: 1px solid var(--ink);
  font-size: .78rem; font-weight: 600; line-height: 1.25;
  text-decoration: none;
}
.ear b { font-weight: 700; color: var(--red); }
.ear-link { transition: background .15s, color .15s; }
.ear-link:hover { background: var(--ink); color: var(--paper); }
.ear-link:hover b { color: var(--paper); }

.flag {
  font: 700 9.6vw/1 var(--black);
  letter-spacing: -.005em;
  padding: .04em 0 .1em;
}
.fit { display: inline-block; white-space: nowrap; }

.strap {
  margin-top: .2rem;
  font-size: .86rem; font-weight: 500; letter-spacing: .16em;
}
.strap b { font-weight: 700; }

.dateline {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  margin-top: .8rem; padding: .42rem 0 .36rem;
  border-top: 1px solid var(--ink);
  border-bottom: 3px double var(--ink);
  font-size: .86rem; font-weight: 600;
}
.dateline > * { flex: 1; }
.dateline > :first-child { text-align: left; }
.dateline > :last-child { text-align: right; }

.index {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .1rem clamp(.9rem, 2.4vw, 2.2rem);
  padding: .5rem 0;
  border-bottom: 1px solid var(--ink);
  font-size: .9rem; font-weight: 600;
}
.index a { text-decoration: none; }
.index a + a::before { content: "·"; margin-right: clamp(.9rem, 2.4vw, 2.2rem); color: var(--soft); }

/* ───────── headlines and copy ───────── */

.kicker { font-size: .8rem; font-weight: 700; color: var(--red); margin-bottom: .35rem; }
.label {
  font-size: .82rem; font-weight: 700;
  padding-bottom: .3rem; margin-bottom: .6rem;
  border-bottom: 1px solid var(--ink);
}

.hed { font-family: var(--hed); text-wrap: balance; }
.hed-xl { font-weight: 900; font-size: clamp(2.15rem, 5vw, 4.5rem); line-height: .99; letter-spacing: -.012em; }
.hed-l  { font-weight: 900; font-size: clamp(1.55rem, 2.5vw, 2.2rem); line-height: 1.04; letter-spacing: -.008em; }
.hed-m  { font-weight: 700; font-size: clamp(1.25rem, 1.75vw, 1.5rem); line-height: 1.1; }
.hed-s  { font-weight: 700; font-size: 1.12rem; line-height: 1.15; }
.hed-i  { font-style: italic; font-weight: 600; }
.hed-g  {                         /* the one gothic headline, as front pages do */
  font-family: var(--cond); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.5rem, 2.1vw, 1.85rem); line-height: 1; letter-spacing: .01em;
}

.deck {
  margin-top: .65rem;
  font: italic 400 clamp(1.1rem, 1.85vw, 1.55rem)/1.2 var(--hed);
  color: var(--soft);
  text-wrap: balance;
}
.deck-s { font-size: 1.05rem; margin-top: .4rem; }

.byline {
  display: flex; flex-wrap: wrap; gap: .1rem .9rem;
  margin: .95rem 0 1rem; padding: .34rem 0 .3rem;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  font-size: .82rem; font-weight: 500;
}
.byline b { font-weight: 700; }
.byline span { color: var(--soft); }

.copy { margin-top: .6rem; }
.copy p {
  text-align: justify; hyphens: auto; -webkit-hyphens: auto;
  font-size: .98rem; line-height: 1.5;
}
.copy p + p { text-indent: 1.2em; }
.s2 .copy p, .s3 .copy p { text-align: left; }
.cols { column-count: 2; column-gap: calc(var(--col) * 2); column-rule: 1px solid var(--hair); margin-top: 1.1rem; }
.cols > p:first-child::first-letter {
  float: left;
  font: 900 4.55em/.78 var(--hed);
  padding: .07em .09em 0 0;
}
.jump { margin-top: .7rem; font-size: .78rem; font-weight: 600; text-indent: 0 !important; text-align: left !important; }

/* ───────── front page ───────── */

.front {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr);
  padding: clamp(1.2rem, 2.4vw, 2rem) 0 clamp(1.6rem, 3vw, 2.6rem);
}
.lead { padding-right: calc(var(--col) * 1.3); }
.rail {
  padding-left: calc(var(--col) * 1.3);
  border-left: 1px solid var(--ink);
  display: flex; flex-direction: column; gap: 1.5rem;
}

.plate { border: 1px solid var(--ink); background: var(--plate); }
.plate canvas {
  display: block; width: 100%;
  height: clamp(210px, 27vw, 350px);
  touch-action: pan-y; cursor: crosshair;
}
.plate figcaption {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .9rem;
  padding: .5rem .7rem;
  border-top: 1px solid var(--ink);
  font-size: .86rem; font-style: italic; line-height: 1.35;
  background: var(--paper);
}
.plate figcaption b { font-style: normal; font-weight: 700; }
.plate .hint { color: var(--soft); }
#regrow {
  flex: none;
  background: none; color: inherit; cursor: pointer;
  border: 1px solid var(--ink);
  padding: .32em .7em .26em;
  font-size: .74rem; font-weight: 700; font-style: normal;
  transition: background .15s, color .15s;
}
#regrow:hover { background: var(--ink); color: var(--paper); }
html:not(.js) .plate { display: none; }

.numbers { border-top: 4px solid var(--ink); padding-top: .5rem; }
.numbers dl { display: grid; grid-template-columns: 1fr 1fr; }
.numbers dl div { padding: .55rem 0 .7rem; border-bottom: 1px solid var(--hair); }
.numbers dl div:nth-child(odd) { padding-right: .8rem; border-right: 1px solid var(--hair); }
.numbers dl div:nth-child(even) { padding-left: .8rem; }
.numbers dl div:nth-last-child(-n + 2) { border-bottom: 0; padding-bottom: 0; }
.numbers dt { font: 900 clamp(2.3rem, 3.6vw, 3.2rem)/.95 var(--hed); letter-spacing: -.02em; }
.numbers dd { margin-top: .25rem; font: 600 .8rem/1.2 var(--cond); letter-spacing: .07em; text-transform: uppercase; color: var(--soft); }

.second { border-top: 1px solid var(--ink); padding-top: 1rem; }

.inside { border-top: 4px solid var(--ink); padding-top: .5rem; }
.inside a {
  display: flex; align-items: baseline; gap: .5rem;
  padding: .36rem 0;
  border-bottom: 1px dotted var(--soft);
  text-decoration: none; font-size: .97rem;
}
.inside li:last-child a { border-bottom: 0; }
.inside a span { flex: 1; }
.inside i { font-style: normal; font-size: .82rem; font-weight: 700; }

/* ───────── section flags ───────── */

.sec-flag {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .2rem 1.5rem;
  margin-top: clamp(1.4rem, 3vw, 2.4rem);
  padding: .5rem 0 .45rem;
  border-top: 5px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  position: relative;
}
.sec-flag::before {
  content: ""; position: absolute; left: 0; right: 0; top: 3px;
  border-top: 1px solid var(--ink);
}
.sec-flag h2 { font: italic 900 clamp(1.7rem, 3.2vw, 2.5rem)/1.05 var(--hed); letter-spacing: -.01em; }
.sec-flag p { font-size: .86rem; font-weight: 500; }
.sec-flag p b { font-weight: 700; }
.sec-sub { border-top-width: 1px; margin-top: 0; }
.sec-sub::before { display: none; }
.sec-sub h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
main > section { scroll-margin-top: .5rem; }

/* ───────── story grids ───────── */

.stories {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  padding: clamp(1rem, 2vw, 1.5rem) 0;
}
.stories + .stories, .stories + .tools { border-top: 1px solid var(--ink); }
.story { padding: 0 var(--col); border-left: 1px solid var(--hair); }
.story:first-child { padding-left: 0; border-left: 0; }
.story:last-child { padding-right: 0; }
.s2 { grid-column: span 2; } .s3 { grid-column: span 3; } .s4 { grid-column: span 4; }
.s5 { grid-column: span 5; } .s8 { grid-column: span 8; }
.rail .story { padding: 0; border-left: 0; }
.rail .second { padding-top: 1rem; }

.tools {
  display: flex; flex-wrap: wrap;
  padding: .75rem 0 .9rem;
  font-size: .86rem; font-weight: 500; line-height: 1.7;
}
.tools b { flex-basis: 100%; font-weight: 700; color: var(--red); }
.tools span { white-space: nowrap; }
.tools span:not(:last-child)::after { content: "·"; margin: 0 .55em; color: var(--soft); }

.bureau-head { padding-bottom: .55rem; margin-bottom: .8rem; border-bottom: 1px solid var(--hair); }
.bureau-head h3 { font: 900 clamp(1.5rem, 2.4vw, 2rem)/1.05 var(--hed); }
.bureau-head p { margin-top: .25rem; font-size: .8rem; font-weight: 500; color: var(--soft); }
.briefs { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem calc(var(--col) * 2); }
.briefs-1 { grid-template-columns: 1fr; }
.briefs p { margin-top: .3rem; font-size: .96rem; line-height: 1.46; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }

/* ───────── listings (stack) ───────── */

.listings {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: clamp(1rem, 2vw, 1.5rem) 0;
}
.listings > div { padding: 0 var(--col); border-left: 1px solid var(--hair); }
.listings > div:first-child { padding-left: 0; border-left: 0; }
.listings > div:last-child { padding-right: 0; }
.listings h3 {
  font: 700 .84rem/1.2 var(--cond); letter-spacing: .1em; text-transform: uppercase;
  color: var(--red);
  padding-bottom: .3rem; border-bottom: 1px solid var(--ink);
}
.listings ul + h3 { margin-top: 1.1rem; }
.listings li {
  padding: .3rem 0;
  border-bottom: 1px dotted var(--soft);
  font: 700 1.12rem/1.2 var(--hed);
}

/* ───────── notices (education) ───────── */

.notices {
  display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--col) * 1.4);
  padding: clamp(1.1rem, 2.2vw, 1.7rem) 0;
}
.notice {
  text-align: center;
  padding: clamp(1.2rem, 2.6vw, 2.1rem) clamp(1rem, 3vw, 2.6rem);
  border: 1px solid var(--ink);
  outline: 1px solid var(--ink); outline-offset: -6px;
}
.notice .label { border: 0; margin: 0 0 .7rem; padding: 0; color: var(--soft); }
.notice h3 { font: 900 clamp(1.5rem, 2.7vw, 2.25rem)/1.06 var(--hed); text-wrap: balance; }
.notice .honor {
  display: inline-block; margin: .8rem 0 .7rem; padding: .22em .9em .16em;
  border-top: 1px solid var(--red); border-bottom: 1px solid var(--red);
  color: var(--red);
  font: 700 .9rem var(--cond); letter-spacing: .22em; text-transform: uppercase;
}
.notice p:last-child { font-style: italic; }

/* ───────── advertisement (contact) ───────── */

footer { padding: clamp(1.6rem, 3.5vw, 3rem) 0 1.4rem; }
.ad-label { text-align: center; font-size: .7rem; font-weight: 600; letter-spacing: .3em; color: var(--soft); margin-bottom: .4rem; }
.ad {
  background: var(--ink); color: var(--paper);
  text-align: center;
  padding: clamp(1.6rem, 4vw, 3.2rem) clamp(1rem, 4vw, 3.4rem);
  outline: 1px solid var(--paper); outline-offset: -8px;
}
.ad-kicker { font-size: .95rem; font-weight: 700; letter-spacing: .3em; }
.mail {
  display: block;
  margin: .5rem 0 .3rem;
  font: italic 900 5.6vw/1.15 var(--hed);
  text-decoration: none;
  letter-spacing: -.01em;
}
.ad a:hover { color: #ff5a4f; }
.ad-sub { font-size: .88rem; font-weight: 500; letter-spacing: .2em; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 1.4rem; }
.links a {
  display: inline-block; padding: .55em 1.1em .48em;
  border: 1px solid var(--paper);
  font-size: .9rem; font-weight: 700; text-decoration: none;
  transition: background .15s, color .15s;
}
.links a:hover { background: var(--paper); color: var(--ink); }
.colophon {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 2rem;
  margin-top: 1.2rem; padding-top: .7rem;
  border-top: 3px double var(--ink);
  font-size: .76rem; font-weight: 500; letter-spacing: .07em; color: var(--soft);
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ───────── narrower pages ───────── */

@media (max-width: 1020px) {
  .front { grid-template-columns: 1fr; }
  .lead { padding-right: 0; }
  .rail {
    margin-top: 1.6rem; padding: 0; border-left: 0;
    display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem calc(var(--col) * 2);
  }
  .rail .second { grid-column: 2; grid-row: 1 / span 2; border-top: 4px solid var(--ink); }
  .stories { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 1.3rem; }
  .s2, .s3, .s4 { grid-column: span 3; }
  .s5, .s8 { grid-column: span 6; }
  .stories > .story:nth-child(n) { padding: 0 var(--col); border-left: 1px solid var(--hair); }
  .stories > .s5, .stories > .s8, .stories > .s5 + .story, .stories > .s8 + .story,
  .stories:not(:has(.s5, .s8)) > .story:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stories > .s5, .stories > .s8 { padding-right: 0; }
  .stories:has(.s5) > .story:nth-child(3), .stories:not(:has(.s5, .s8)) > .story:nth-child(even) { padding-right: 0; }
  .stories > .s8 + .s4 { grid-column: span 6; padding: 0; }
  .listings { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 1.4rem; }
  .listings > div:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
  .listings > div:nth-child(3n) { padding-right: 0; }
}

@media (max-width: 680px) {
  body { font-size: 1rem; }
  .ears { grid-template-columns: minmax(0, 1fr); }
  .ear { display: none; }
  .flag { font-size: 12.6vw; }
  .strap { font-size: .72rem; letter-spacing: .1em; }
  .dateline { flex-wrap: wrap; font-size: .76rem; letter-spacing: .06em; gap: .15rem .5rem; }
  .dateline #date { order: -1; flex-basis: 100%; text-align: center; }
  .index { font-size: .84rem; gap: .25rem 1.1rem; }
  .index a + a::before { content: none; }
  .cols { column-count: 1; }
  .copy p, .briefs p { text-align: left; hyphens: manual; -webkit-hyphens: manual; }
  .plate figcaption { flex-direction: column; }
  .plate .hint { display: none; }
  .rail { grid-template-columns: 1fr; }
  .rail .second { grid-column: auto; grid-row: auto; }
  .stories { grid-template-columns: 1fr; row-gap: 0; padding: 0; }
  .stories > .story:nth-child(n) {
    grid-column: 1; padding: 1.1rem 0; border-left: 0; border-top: 1px solid var(--hair);
  }
  .stories > .story:first-child { border-top: 0; }
  .briefs { grid-template-columns: 1fr; }
  .listings { grid-template-columns: 1fr 1fr; }
  .listings > div:nth-child(n) { padding: 0 var(--col); border-left: 1px solid var(--hair); }
  .listings > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .listings > div:nth-child(even) { padding-right: 0; }
  .notices { grid-template-columns: 1fr; }
  .mail { font-size: 6.2vw; }
  .ad-kicker, .ad-sub { letter-spacing: .14em; }
  .colophon { flex-direction: column; }
}

@media print {
  body { background: #fff; }
  .plate, .index, .skip, #regrow { display: none; }
  .ad { background: none; color: #000; outline-color: #000; border: 1px solid #000; }
}
