/* Last Word showcase. One light look on purpose. No inline styles anywhere (the security policy forbids them).
   The same stylesheet draws the share picture (make-images.mjs). */
@font-face { font-family: 'Fraunces'; font-weight: 900; font-display: swap; src: url('/fonts/fraunces-900.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson'; font-weight: 400; font-display: swap; src: url('/fonts/atkinson-hyperlegible-400.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson'; font-weight: 700; font-display: swap; src: url('/fonts/atkinson-hyperlegible-700.woff2') format('woff2'); }

:root {
  --paper: #fbfcff; --ink: #12142a; --blue: #2a41c4; --dot: #3552d9; --soft-blue: #dfe4ff; --step: #4a63dc; --yellow: #ffe14d; --white: #fff;
  --display: 'Fraunces', Georgia, serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 'Atkinson', system-ui, sans-serif; overflow-wrap: break-word; }
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 900; }
h2 { font-size: clamp(28px, 5cqi, 46px); line-height: 1.08; text-wrap: balance; }
h3 { font-size: 24px; line-height: 1.2; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.blue :focus-visible, .ink :focus-visible { outline-color: var(--yellow); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.band { padding-inline: clamp(18px, 5vw, 64px); }
.in { max-width: 960px; margin: 0 auto; container-type: inline-size; }
.sec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; padding-block: 56px; }
.blue { background: var(--blue); color: var(--white); }
.ink { background: var(--ink); color: var(--white); }

/* Top bar and logo */
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; padding-block: 14px; }
.logo { display: inline-flex; align-items: flex-end; min-height: 44px; padding-block: 8px; font: 900 28px/1 var(--display); text-decoration: none; white-space: nowrap; }
.logo svg { width: .62em; height: .62em; margin-left: .06em; }
.side { display: inline-flex; align-items: center; min-height: 32px; font-size: 14px; }

/* Hero: Dexter is the full stop, Hank hangs from the top */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 20px; padding-block: 36px 56px; }
.dangle { position: absolute; top: -8px; right: 3cqi; width: clamp(96px, 27cqi, 260px); transform-origin: 50% 0; animation: swing 2.5s ease-in-out 2; }
.dangle::before { content: ''; display: block; height: 5px; margin: 0 22%; border-radius: 5px; background: var(--ink); }
.dangle svg { display: block; width: 100%; margin-top: -4%; }
.dangle p { margin-top: 6px; font-weight: 700; font-size: clamp(13px, 1.8cqi, 17px); text-align: center; }
.big { font-family: var(--display); font-weight: 900; font-size: clamp(42px, 14cqi, 140px); line-height: .94; letter-spacing: -.025em; margin-bottom: 16px; }
.big mark { background: linear-gradient(transparent 62%, var(--yellow) 62% 90%, transparent 90%); color: inherit; }
.big .dot { display: inline-block; width: 1.65em; margin-left: .02em; vertical-align: -.07em; }
.big .dot svg { display: block; width: 100%; }
.lede { max-width: 52ch; font-size: 19px; }
.fine { font-size: 14px; }
.cta, summary { display: inline-flex; align-items: center; min-height: 48px; padding: 10px 22px; border-radius: 99px; background: var(--ink); color: var(--yellow); font-weight: 700; text-decoration: none; cursor: pointer; }
@keyframes swing { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }

/* The goodbye chat */
.chatwrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; max-width: 640px; }
.chat { display: grid; gap: 10px; }
.msg { justify-self: start; max-width: 88%; padding: 11px 16px; border-radius: 18px; background: var(--white); color: var(--ink); }
.msg.r { justify-self: end; background: var(--soft-blue); }
.msg.key { background: var(--yellow); font-weight: 700; font-size: 20px; transform: rotate(-1deg); }
.hangs { display: flex; align-items: center; gap: 12px; margin: -16px 0 0 70px; }
.hangs svg { flex: none; width: 104px; }
.hangs p { min-width: 0; font: 900 clamp(18px, 3cqi, 24px)/1.2 var(--display); }
.stamp { justify-self: center; font-size: 14px; }
.shout { display: flex; align-items: center; gap: 14px; }
.shout svg { flex: none; width: 96px; }
.shout p { min-width: 0; font: 900 clamp(20px, 3.6cqi, 28px)/1.2 var(--display); }

/* The duo */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cards article { display: grid; justify-items: center; align-content: start; gap: 8px; padding: 22px; border-radius: 20px; background: var(--paper); color: var(--ink); text-align: center; }
.cards svg { width: auto; max-width: 100%; height: 200px; }
.motto { font: 900 19px/1.25 var(--display); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.steps li { counter-increment: step; padding: 20px; border: 2px solid var(--ink); border-radius: 16px; background: var(--white); }
.steps li::before { content: counter(step); display: block; margin-bottom: 10px; font: 900 40px/1 var(--display); color: var(--step); }
.steps h3 { margin-bottom: 6px; }

/* Try to get the last word: nested <details>, no scripts */
.gag { justify-items: start; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
details[open] > summary { background: var(--soft-blue); color: var(--ink); }
details details { margin-top: 12px; }
.turn { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.turn svg { flex: none; width: 46px; height: 52px; }
.turn .msg { max-width: none; min-width: 0; }

/* Promises and footer */
.promises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.promises li { padding-top: 12px; border-top: 4px solid var(--step); }
.promises b { display: block; font-size: 19px; }
.foot { border-top: 1px solid #d5d9e8; padding-block: 28px; }
.row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.row a { display: inline-flex; align-items: center; min-height: 44px; }
.status { padding: 6px 14px; border: 2px dashed var(--ink); border-radius: 99px; font-size: 14px; }

/* Not found */
.lost { justify-items: start; }
.lost svg { width: 200px; max-width: 100%; }
.lost h1 { font-size: clamp(34px, 7cqi, 64px); line-height: 1.05; }

@container (max-width: 640px) {
  .cards, .steps, .promises { grid-template-columns: minmax(0, 1fr); }
  .hangs { margin-left: 12px; }
  .dangle { right: 2cqi; width: 76px; }
  .dangle p { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dangle { animation: none; }
}

/* Share picture (1200 × 630), rendered by make-images.mjs; not used on the pages */
.share { width: 1200px; height: 630px; display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: end; padding: 70px 70px 56px; border-bottom: 16px solid var(--dot); overflow: hidden; }
.share .big { font-size: 124px; margin: 0; }
.share-words { display: grid; gap: 30px; }
.share-words p { font: 900 34px/1.2 var(--display); }
.share-hank { align-self: start; margin-top: -70px; }
.share-hank::before { content: ''; display: block; width: 6px; height: 90px; margin: 0 auto; background: var(--ink); }
.share-hank svg { display: block; width: 100%; margin-top: -12px; }
