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

:root {
  --bg: #f7f7f2;
  --paper: #fffefa;
  --ink: #050505;
  --muted: #565656;
  --line: #111111;
  --hairline: #d6d2c7;
  --accent: #ffcc00;
  --accent-dark: #a36d00;
  --max: 1180px;
  --measure: 760px;
  --sans: Arial, Helvetica, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

html {
  font-size: 16px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px) 0 0 / 64px 64px,
    var(--bg);
  font-family: var(--serif);
  line-height: 1.48;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--ink);
  text-decoration-color: var(--accent-dark);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.16em;
}

a:hover {
  background: var(--accent);
  color: var(--ink);
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 46px;
  padding: 0 20px;
  border-bottom: 3px solid var(--line);
  background: rgba(255, 254, 250, 0.95);
  font-family: var(--sans);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.brand::before {
  content: "";
  width: 10px;
  height: 30px;
  margin-right: 10px;
  background: var(--accent);
  border: 1px solid var(--line);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
}

.nav a,
.page-footer a {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: uppercase;
}

.page {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 34px 20px 72px;
}

article {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 920px);
  gap: 20px;
  padding: 28px 0 24px;
  border-bottom: 4px solid var(--line);
}

.section-label {
  grid-column: 1 / -1;
  width: max-content;
  max-width: 100%;
  padding: 5px 8px 4px;
  background: var(--accent);
  border: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 920px;
  font-family: var(--sans);
  font-size: clamp(36px, 6.2vw, 74px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.96;
}

.page--case h1 {
  font-size: clamp(30px, 4.2vw, 50px);
  line-height: 1.02;
}

.page--dmap h1 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
}

.dek {
  grid-column: 1;
  max-width: var(--measure);
  margin: 8px 0 0;
  color: #151515;
  font-size: clamp(19px, 2.2vw, 27px);
  line-height: 1.18;
}

.source-line {
  grid-column: 1 / -1;
  max-width: var(--measure);
  margin: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.35;
}

.story-body {
  padding: 30px 0 42px;
}

.story-body > p,
.story-body > blockquote,
.story-body > ol,
.story-body > ul,
.story-body > hr {
  max-width: var(--measure);
}

.story-body > p {
  margin: 0 0 18px;
  font-size: 18px;
}

.story-body figure {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.story-body img {
  max-width: 100%;
  height: auto;
}

.story-body a {
  overflow-wrap: anywhere;
}

.story-body > h2,
.story-body > h3 {
  font-family: var(--sans);
  letter-spacing: 0;
}

.story-body > h2 {
  display: inline-block;
  margin: 30px 0 12px;
  padding: 6px 8px 5px;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  font-size: 20px;
  line-height: 1;
}

.story-body > h3 {
  margin: 26px 0 10px;
  font-size: 23px;
}

.story-body > hr {
  height: 1px;
  margin: 30px 0;
  border: 0;
  background: var(--line);
}

.story-body strong {
  font-family: var(--sans);
  font-size: 0.92em;
}

.page--case .story-body > h2 + p,
.page--case .story-body > h2 + p + p,
.page--case .story-body > h2 + p + p + p {
  position: relative;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px;
  max-width: 920px;
  margin: 0;
  padding: 13px 0;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.38;
}

.page--case .story-body > h2 + p strong,
.page--case .story-body > h2 + p + p strong,
.page--case .story-body > h2 + p + p + p strong {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.page--index .story-body > ul {
  max-width: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  margin: 18px 0 0;
  border-top: 2px solid var(--line);
  list-style: none;
}

.page--index .story-body > ul > li {
  min-height: 86px;
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.18;
}

.page--index .story-body > ul > li:nth-child(odd) {
  padding-right: 22px;
  border-right: 1px solid var(--line);
}

.page--index .story-body > ul > li:nth-child(even) {
  padding-left: 22px;
}

.page--index .story-body > ul a[href*="youtube"],
.page--index .story-body > ul a[href*="youtu.be"] {
  display: inline-block;
  margin-left: 6px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: uppercase;
}

.page--dmap .story-body {
  font-family: var(--serif);
}

.page--dmap .story-body > ul,
.page--dmap .story-body > ol {
  margin: 8px 0 22px;
  padding-left: 22px;
}

.page--dmap .story-body > ul > li,
.page--dmap .story-body > ol > li {
  margin: 6px 0;
  font-size: 18px;
}

.page--dmap .story-body > table,
.page--index .story-body > table {
  display: block;
  width: 100%;
  max-width: none;
  margin: 18px 0 30px;
  overflow-x: auto;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.32;
}

.page--dmap .story-body th,
.page--dmap .story-body td,
.page--index .story-body th,
.page--index .story-body td {
  min-width: 150px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.page--dmap .story-body th,
.page--index .story-body th {
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.page--dmap .story-body td:first-child,
.page--index .story-body td:first-child {
  font-weight: 800;
}

.page--dmap .story-body > p strong {
  padding: 2px 4px;
  background: var(--accent);
}

.page-footer {
  padding: 18px 0 24px;
  border-top: 1px solid var(--line);
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 8px 14px 10px;
  }

  .brand {
    min-height: 32px;
  }

  .hero {
    display: block;
    padding-top: 22px;
  }

  .section-label,
  .dek,
  .meta-strip,
  .source-line,
  .original-file {
    margin-top: 16px;
  }

  .page--index .story-body > ul {
    grid-template-columns: 1fr;
  }

  .page--index .story-body > ul > li,
  .page--index .story-body > ul > li:nth-child(odd),
  .page--index .story-body > ul > li:nth-child(even) {
    padding: 14px 0;
    border-right: 0;
  }

  .page--case .story-body > h2 + p,
  .page--case .story-body > h2 + p + p,
  .page--case .story-body > h2 + p + p + p {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 22px 10px 52px;
  }

  .nav {
    justify-content: flex-start;
    gap: 12px;
  }

  h1 {
    font-size: clamp(34px, 10vw, 44px);
    line-height: 1;
  }

  .page--case h1 {
    font-size: clamp(28px, 8vw, 36px);
    line-height: 1.05;
  }

  .dek {
    font-size: 20px;
  }

  .story-body {
    padding-top: 24px;
  }

  .story-body > p {
    font-size: 17px;
  }

  .story-body > h2 {
    max-width: 100%;
    white-space: normal;
    font-size: 18px;
    line-height: 1.08;
  }

  .story-body > h3 {
    font-size: 21px;
  }

  .page--dmap .story-body > table,
  .page--index .story-body > table {
    font-size: 13px;
  }

  .page--dmap .story-body th,
  .page--dmap .story-body td,
  .page--index .story-body th,
  .page--index .story-body td {
    min-width: 132px;
    padding: 9px 10px;
  }
}
