/* ==========================================================================
   Kinetiq Hype — newspaper on black
   ========================================================================== */

:root {
  --bg: #000000;
  --bg-raised: #0a0a0a;
  --ink: #e9e7e2;
  --ink-dim: #a5a19a;
  --ink-faint: #6f6b64;
  --rule: #24231f;
  --rule-strong: #3a3833;
  --accent: #f5f3ee;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --measure: 48rem;
  --gutter: 1.75rem;
}

/*
   The measure and the type scale move together. Widening the column alone
   would just make lines longer and harder to track, so the font size steps up
   with it to keep the line length in the readable 75-85 character range.
*/

@media (min-width: 60rem) {
  :root {
    --measure: 56rem;
    --gutter: 2.5rem;
  }
}

@media (min-width: 82rem) {
  :root {
    --measure: 62rem;
    --gutter: 3rem;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 60rem) {
  body {
    font-size: 1.3125rem;
    line-height: 1.7;
  }
}

@media (min-width: 82rem) {
  body {
    font-size: 1.375rem;
  }
}

/* --------------------------------------------------------------- skip link */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.75rem 1.25rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* ------------------------------------------------------------------ layout */

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.masthead {
  border-bottom: 1px solid var(--rule);
  padding-block: 1.5rem 1.25rem;
}

.masthead__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.masthead__logo {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.masthead__tag {
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ------------------------------------------------------- reading progress */

.progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  z-index: 90;
  transition: width 90ms linear;
}

/* ------------------------------------------------------------------ header */

.article-head {
  padding-block: 3.25rem 2.25rem;
  border-bottom: 3px double var(--rule-strong);
}

.kicker {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.125rem;
}

h1 {
  font-size: clamp(2.125rem, 5.6vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 1.125rem;
  text-wrap: balance;
}

.standfirst {
  font-size: clamp(1.3125rem, 1.9vw, 1.6875rem);
  line-height: 1.5;
  color: var(--ink-dim);
  margin: 0;
  font-style: italic;
  text-wrap: pretty;
}

.byline {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 1.75rem 0 0;
}

/* ------------------------------------------------------------------- intro */

.lede > p:first-of-type::first-letter {
  float: left;
  font-size: 3.6em;
  line-height: 0.82;
  padding: 0.06em 0.09em 0 0;
  font-weight: 700;
  color: var(--accent);
}

/* --------------------------------------------------------------------- toc */

.toc {
  border: 1px solid var(--rule);
  background: var(--bg-raised);
  padding: 1.5rem 1.75rem 1.75rem;
  margin-block: 2.75rem;
}

.toc__title {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1rem;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
  border-top: 1px solid var(--rule);
  padding-block: 0.5rem;
}

.toc li:first-child {
  border-top: 0;
  padding-top: 0;
}

.toc a {
  display: block;
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.97em;
  line-height: 1.4;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-right: 0.875rem;
}

.toc a:hover,
.toc a:focus,
.toc a[aria-current="true"] {
  color: var(--accent);
}

.toc a[aria-current="true"]::before {
  color: var(--accent);
}

/* ---------------------------------------------------------------- headings */

h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.375rem);
  line-height: 1.18;
  letter-spacing: -0.014em;
  font-weight: 700;
  margin: 3.5rem 0 1.125rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  text-wrap: balance;
}

h3 {
  font-size: 1.18em;
  line-height: 1.32;
  font-weight: 700;
  margin: 2.25rem 0 0.75rem;
  color: var(--accent);
  text-wrap: balance;
}

h4 {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 1.75rem 0 0.5rem;
}

/* --------------------------------------------------------------- body copy */

p {
  margin: 0 0 1.3125rem;
  text-wrap: pretty;
}

strong {
  color: var(--accent);
  font-weight: 700;
}

em {
  font-style: italic;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  text-decoration-color: var(--rule-strong);
}

a:hover,
a:focus {
  text-decoration-color: var(--accent);
}

ul,
ol {
  margin: 0 0 1.3125rem;
  padding-left: 1.375rem;
}

li {
  margin-bottom: 0.5rem;
}

li::marker {
  color: var(--ink-faint);
}

/* ------------------------------------------------------------------ pullquote */

.pullquote {
  margin: 2.75rem 0;
  padding: 0 0 0 1.75rem;
  border-left: 2px solid var(--rule-strong);
  font-size: clamp(1.375rem, 2.1vw, 1.75rem);
  line-height: 1.38;
  font-style: italic;
  color: var(--accent);
}

.pullquote p {
  margin: 0;
}

/* ---------------------------------------------------------------- keyfacts */

.keyfacts {
  border: 1px solid var(--rule);
  background: var(--bg-raised);
  padding: 1.5rem 1.75rem;
  margin-block: 2.5rem;
}

.keyfacts h2,
.keyfacts h3 {
  border: 0;
  padding: 0;
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.keyfacts dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(11rem, auto) 1fr;
  gap: 0;
}

.keyfacts dt {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0.6875rem 1rem 0.6875rem 0;
  border-top: 1px solid var(--rule);
}

.keyfacts dd {
  margin: 0;
  font-size: 0.95em;
  padding: 0.625rem 0;
  border-top: 1px solid var(--rule);
}

.keyfacts dl > dt:first-of-type,
.keyfacts dl > dt:first-of-type + dd {
  border-top: 0;
}

/* ------------------------------------------------------------------- table */

.table-scroll {
  overflow-x: auto;
  margin-block: 2rem;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92em;
  line-height: 1.5;
}

caption {
  caption-side: top;
  text-align: left;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-bottom: 0.875rem;
}

th,
td {
  text-align: left;
  padding: 0.75rem 1rem 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

thead th {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--rule-strong);
  white-space: nowrap;
}

tbody th {
  font-weight: 700;
  color: var(--accent);
}

/* --------------------------------------------------------------------- faq */

.faq {
  margin-block: 1.5rem 0;
}

.faq__item {
  border-top: 1px solid var(--rule);
  padding-block: 1.25rem;
}

.faq__q {
  font-size: 1.08em;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.625rem;
  line-height: 1.35;
}

.faq__a {
  margin: 0;
  color: var(--ink-dim);
}

.faq__a p {
  margin-bottom: 0.75rem;
}

.faq__a p:last-child {
  margin-bottom: 0;
}

/* -------------------------------------------------------------- page ending */

main {
  padding-bottom: 6rem;
}

/* -------------------------------------------------------------- 404 / misc */

.center-pane {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 4rem;
}

/* --------------------------------------------------------- responsive trim */

@media (max-width: 34rem) {
  :root {
    /* Narrow gutter so the column keeps a usable line length on phones. */
    --gutter: 1.25rem;
  }

  body {
    font-size: 1.125rem;
  }

  .keyfacts,
  .toc {
    padding-inline: 1.125rem;
  }

  .keyfacts dl {
    grid-template-columns: 1fr;
  }

  .keyfacts dd {
    border-top: 0;
    padding-top: 0;
    padding-bottom: 0.75rem;
  }

  .keyfacts dl > dt:first-of-type + dd {
    border-top: 0;
  }

  .lede > p:first-of-type::first-letter {
    font-size: 3.1em;
  }
}

/* -------------------------------------------------------------- a11y prefs */

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

  .progress {
    transition: none;
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* -------------------------------------------------------------------- print */

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .progress,
  .toc,
  .masthead {
    display: none;
  }

  a {
    color: #000;
  }
}
