@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Lato:wght@400;700&display=swap');

:root {
  --white: #FAFCFE;
  --red: #A52B20;
  --ink: #322C2B;
  --clay: #F0D8CF;
  --silver: #C7CECE;
  color-scheme: light;
  font-family: 'Lato', 'Arial', sans-serif;
  color: var(--ink);
  background: var(--white);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 18px; line-height: 1.65; }
a { color: var(--red); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, summary { font: inherit; cursor: pointer; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 5px; }
button:focus-visible { outline-offset: 4px; }
::selection { background: var(--clay); color: var(--ink); }
img, svg { max-width: 100%; }
.skip-link { position: absolute; left: 20px; top: -100px; padding: 10px 18px; background: var(--white); z-index: 10; }
.skip-link:focus { top: 10px; }
.masthead { max-width: 1200px; margin: 0 auto; padding: 28px 32px 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--silver); position: relative; z-index: 3; }
.signature { color: var(--ink); text-decoration: none; display: inline-flex; flex-direction: column; line-height: 1.1; }
.signature strong { font-family: 'DM Serif Display', 'Georgia', serif; font-size: 27px; font-weight: 400; }
.signature strong span { color: var(--red); }
.signature small { font-size: 16px; margin-top: 9px; }
.menu summary { display: flex; gap: 13px; align-items: center; min-height: 44px; min-width: 80px; color: var(--ink); list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: '+'; color: var(--red); font-size: 27px; line-height: 1; }
.menu[open] summary::after { content: '−'; }
.menu nav { position: absolute; top: calc(100% - 1px); right: 0; width: 390px; max-width: calc(100vw - 32px); padding: 22px 32px; background: var(--clay); border-bottom: 3px solid var(--red); }
.menu ol { list-style: none; padding: 0; margin: 0; }
.menu a { display: block; color: var(--ink); font-size: 18px; padding: 9px 0; min-height: 44px; text-decoration: none; }
.menu a:hover, .menu a[aria-current='page'] { text-decoration: underline; text-decoration-color: var(--red); }
.sheet { position: relative; max-width: 1140px; margin: 0 auto; padding: 42px 24px 0; }
.letter { max-width: 760px; margin-left: 198px; margin-right: 56px; }
.outer-one { position: absolute; width: 170px; left: 18px; top: 103px; font-family: 'DM Serif Display', 'Georgia', serif; font-size: 330px; line-height: 1; color: transparent; -webkit-text-stroke: 1.4px var(--red); user-select: none; }
.letter-kicker { margin: 0 0 16px; font-size: 16px; color: var(--red); }
h1, h2, h3 { font-family: 'DM Serif Display', 'Georgia', serif; font-weight: 400; line-height: 1.1; }
h1 { font-size: clamp(40px, 4.7vw, 64px); letter-spacing: -.025em; margin: 0 0 24px; text-wrap: balance; }
.inner h1 { font-size: clamp(39px, 4.3vw, 59px); max-width: 730px; }
h2 { font-size: clamp(30px, 3vw, 37px); margin: 44px 0 17px; letter-spacing: -.01em; }
.photo { margin: 0; background: var(--clay); overflow: hidden; position: relative; }
.photo img { display: block; width: 100%; height: auto; object-fit: cover; }
.photo .paper-study { display: block; width: 100%; height: auto; }
.hero-photo { margin: 0 0 16px; height: 108px; }
.hero-photo img, .hero-photo .paper-study { height: 108px; }
.body-photo { margin: 40px -48px 42px 0; max-width: 760px; }
.body-photo img, .body-photo .paper-study { max-height: 330px; object-fit: cover; }
.check-date { margin: 10px 0 23px; font-size: 16px; color: var(--red); }
.letter-body .salutation { margin: 0 0 17px; }
.initial { display: inline-flex; justify-content: center; align-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--clay); font-family: 'DM Serif Display', 'Georgia', serif; font-size: 29px; margin-right: 1px; vertical-align: -.06em; }
.letter-body p { margin: 0 0 20px; }
.letter-body ul { list-style: none; padding: 0; margin: 22px 0 27px; }
.letter-body li { position: relative; padding-left: 28px; margin: 0 0 17px; }
.letter-body li::before { content: ''; position: absolute; width: 10px; height: 2px; left: 0; top: .8em; background: var(--red); }
.welcome .code-sentence { font-size: 22px; line-height: 1.65; margin-bottom: 22px; }
.code-run { display: inline-flex; align-items: center; gap: 13px; white-space: nowrap; }
.code-word { display: inline; font-family: 'DM Serif Display', 'Georgia', serif; color: var(--red); font-size: 62px; font-weight: 400; line-height: 1.15; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .1em; user-select: text; -webkit-user-select: text; }
.copy { display: none; border: 1px solid var(--red); border-radius: 0; padding: 7px 10px; min-height: 44px; color: var(--red); background: var(--white); align-items: center; gap: 6px; font-size: 16px; }
.has-clipboard .copy { display: inline-flex; }
.copy:hover { color: var(--ink); background: var(--clay); }
.copy img { width: 17px; height: 17px; }
.postscript { border-left: 3px solid var(--red); padding: 3px 0 3px 22px; margin: 22px 0; }
.postscript p { margin-bottom: 0; }
.postscript .code-word { font-size: 40px; }
.letter-body .signature-line { font-family: 'DM Serif Display', 'Georgia', serif; font-size: 23px; line-height: 1.35; padding-top: 17px; margin-top: 27px; }
.signature-line::before { content: ''; display: block; width: 76px; height: 1px; background: var(--red); margin-bottom: 15px; }
.margin-note { position: absolute; left: 24px; top: 470px; width: 148px; font-size: 16px; line-height: 1.5; }
.margin-note p { margin-bottom: 12px; }
.margin-note time { display: block; }
.copy-status { font-size: 16px; color: var(--red); }
.copy-status:empty { display: none; }
.answer { border-top: 1px solid var(--silver); margin-top: 30px; padding-top: 3px; }
.answer h2 { margin-top: 23px; font-size: 29px; line-height: 1.25; }
.onward { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--ink); }
.onward p { margin: 0 0 6px; color: var(--red); font-size: 16px; }
.onward a { display: inline-block; font-family: 'DM Serif Display', 'Georgia', serif; font-size: 29px; line-height: 1.3; color: var(--ink); text-decoration-color: var(--red); padding: 5px 0 10px; }
.onward img { width: 23px; height: 23px; margin-left: 10px; vertical-align: -.1em; }
.colophon { max-width: 1140px; margin: 0 auto; padding: 54px 80px 38px 222px; font-size: 16px; }
.colophon p { max-width: 760px; margin: 0 0 12px; }
.colophon .copyright { color: var(--red); }

@media (min-width: 1500px) {
  .masthead { max-width: 1280px; }
  .sheet, .colophon { max-width: 1220px; }
  .letter { margin-left: 238px; }
  .outer-one { left: 48px; }
  .margin-note { left: 54px; }
  .colophon { padding-left: 262px; }
}

@media (max-width: 950px) {
  .sheet { padding-top: 32px; }
  .letter { margin-left: 92px; margin-right: 16px; }
  .outer-one { font-size: 180px; width: 80px; left: 13px; top: 100px; }
  .margin-note { position: static; width: auto; max-width: 620px; border-top: 1px solid var(--silver); padding-top: 15px; margin-top: 23px; }
  .margin-note p { display: inline; }
  .margin-note time { display: inline; }
  .body-photo { margin-right: 0; }
  .colophon { padding-left: 116px; padding-right: 40px; }
}

@media (max-width: 600px) {
  body { font-size: 17px; line-height: 1.65; }
  .masthead { padding: 19px 24px 17px; gap: 10px; }
  .signature strong { font-size: 24px; }
  .signature small { font-size: 16px; margin-top: 6px; }
  .menu summary { min-width: 61px; gap: 8px; font-size: 16px; }
  .menu nav { right: 16px; padding: 15px 24px; width: 358px; }
  .sheet { padding: 26px 24px 0; }
  .letter { margin: 0; max-width: 100%; }
  .letter-kicker { margin-bottom: 12px; padding-left: 36px; }
  .outer-one { font-size: 64px; width: 30px; top: 15px; left: 22px; -webkit-text-stroke-width: 1px; }
  h1, .inner h1 { font-size: 39px; line-height: 1.08; letter-spacing: -.025em; margin-bottom: 18px; }
  .home h1 { font-size: 36px; }
  .hero-photo, .hero-photo img, .hero-photo .paper-study { height: 52px; }
  .hero-photo { margin-bottom: 12px; }
  .check-date { margin: 0 0 17px; }
  .letter-body .salutation { margin-bottom: 12px; }
  .initial { width: 34px; height: 34px; font-size: 25px; }
  .welcome .code-sentence { font-size: 19px; line-height: 1.6; margin-bottom: 15px; }
  .code-word { font-size: 49px; }
  .code-run { gap: 10px; }
  .copy { padding: 7px 8px; gap: 5px; }
  .postscript { margin: 17px 0; padding-left: 15px; }
  .postscript .code-word { font-size: 36px; }
  .letter-body .signature-line { font-size: 22px; padding-top: 9px; margin-top: 19px; }
  .signature-line::before { margin-bottom: 11px; }
  .margin-note { margin-top: 19px; }
  h2 { margin-top: 35px; font-size: 31px; }
  .answer h2 { font-size: 27px; }
  .body-photo { margin: 32px -24px; max-width: calc(100% + 48px); }
  .body-photo img, .body-photo .paper-study { max-height: 220px; }
  .onward { margin-top: 37px; padding-top: 20px; }
  .onward a { font-size: 27px; }
  .colophon { padding: 39px 24px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto; animation: none; transition: none; }
}
