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

:root {
  --bg: #f4efe7;
  --paper: #fbf7ef;
  --ink: #191713;
  --muted: #6c6257;
  --line: #26231f;
  --hairline: #ddd2c4;
  --accent: #cc785c;
  --accent-dark: #8f4c38;
  --sand: #e8dccb;
  --max: 1180px;
  --measure: 760px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", 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: 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: rgba(204, 120, 92, 0.18);
  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: 1px solid var(--line);
  background: rgba(251, 247, 239, 0.95);
  font-family: var(--sans);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.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: 1px solid var(--hairline);
  border-radius: 10px;
  box-shadow: 0 18px 60px rgba(25, 23, 19, 0.08);
}

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

.section-label {
  grid-column: 1 / -1;
  width: max-content;
  max-width: 100%;
  padding: 5px 8px 4px;
  background: var(--sand);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 750;
  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: 760;
  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;
}

.knowlume-credit {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 920px;
  margin: 22px 34px 0;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: #fffaf2;
  font-family: var(--sans);
}

.knowlume-credit img {
  width: 132px;
  max-width: 34vw;
  height: auto;
}

.knowlume-credit p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.knowlume-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px !important;
}

.knowlume-links a {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.source-video {
  max-width: 920px;
  margin: 22px 34px 0;
  font-family: var(--sans);
}

.source-video h2 {
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 760;
}

.source-video__frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ink);
}

.source-video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.source-video__link {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  text-transform: uppercase;
}

.source-video--intro {
  margin-top: 0;
  margin-bottom: 34px;
}

.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 34px 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 iframe {
  width: min(100%, 920px);
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ink);
}

.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 > p.case-shift-row {
  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 > p.case-shift-row strong:first-child {
  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 34px 24px;
  border-top: 1px solid var(--hairline);
}

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

  .hero,
  .story-body,
  .page-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .knowlume-credit,
  .source-video {
    margin-left: 18px;
    margin-right: 18px;
  }

  .knowlume-credit {
    align-items: flex-start;
    flex-direction: column;
  }

  .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 > p.case-shift-row {
    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;
  }
}
