/* Direction B: paper reading surfaces and opaque docked navigation. */
html {
  background: #faf7f0;
  color: #161514;
}
body {
  --dock: calc(72px + env(safe-area-inset-bottom));
  padding-bottom: calc(var(--dock) + 24px);
}
body[data-kind="reader"] {
  padding-bottom: calc(var(--dock) + 128px);
}
header,
.b-header {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #faf7f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid #c9c2b4;
  min-height: 64px;
}
header .masthead {
  font-size: clamp(26px, 7vw, 40px);
  text-align: left;
  line-height: 1.4;
}
header p {
  display: none;
}
.header-archive {
  font-size: 14px;
  min-height: 48px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
main {
  max-width: 680px;
  padding: 20px 18px;
}
main,
main > * {
  min-width: 0;
}
h1,
h2,
h3,
p,
a {
  overflow-wrap: anywhere;
}
h1 {
  font-size: 28px;
  line-height: 1.6;
}
h2 {
  font-size: 22px;
  line-height: 1.65;
}
.b-bottom {
  position: fixed;
  inset: auto 0 0;
  z-index: 6;
  background: #fffdf8;
  border-top: 1px solid #c9c2b4;
  display: flex;
  align-items: stretch;
  min-height: var(--dock);
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
}
.b-bottom > a,
.b-bottom > button {
  flex: 1;
  min-width: 0;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.6;
  border: 0;
  border-radius: 0;
  background: #fffdf8;
  color: #161514;
  padding: 8px 4px;
}
.b-bottom > button {
  background: #17793f;
  color: white;
}
.edition-rings {
  display: flex;
  gap: 18px;
  overflow: auto;
  margin: 0 -18px;
  padding: 0 18px 18px;
  border-bottom: 1px solid #c9c2b4;
}
.edition-rings > a {
  flex: 0 0 72px;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
  color: #161514;
}
.edition-rings img {
  width: 56px;
  height: 80px;
  object-fit: cover;
  border-radius: 25px;
  border: 2px solid #c41320;
  padding: 3px;
  margin: 0 auto 8px;
}
.edition-line {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 20px 0;
}
.edition-line > div {
  flex: 1;
}
.edition-line h1 {
  font-size: 18px;
  margin: 4px 0;
}
.edition-line p {
  font-size: 14px;
  margin: 0;
  color: #5f5951;
}
.page-filters {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 14px;
}
.page-filters button {
  flex-shrink: 0;
  border-radius: 24px;
  font-size: 14px;
}
.page-filters [aria-pressed="true"] {
  color: #fff;
  background: #161514;
}
.feed-item {
  margin: 12px 0 24px;
  border-bottom: 1px solid #c9c2b4;
  padding-bottom: 12px;
}
.story-card {
  display: block;
  text-decoration: none;
  padding: 30px 24px;
  min-height: 240px;
  color: inherit;
}
.story-card h2 {
  font-size: 28px;
  margin: 18px 0 0;
}
.type-news {
  background: #f3efe5;
  color: #161514;
  border-bottom: 4px solid #161514;
}
.type-lead {
  background: #c41320;
  color: #fff;
}
.type-quote {
  background: #161514;
  color: #fff;
  border-top: 5px solid #f2c14e;
}
.kicker {
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 12px;
}
.story-row {
  display: flex;
  gap: 16px;
  align-items: center;
  text-decoration: none;
  color: #161514;
  padding: 8px 0;
}
.story-row h2 {
  font-size: 20px;
  margin: 0;
}
.page-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 56px;
  height: 64px;
  background: #f3efe5;
  font-size: 28px;
  border-bottom: 3px solid #161514;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: #5f5951;
  padding-top: 8px;
}
.card-meta button {
  border: 0;
  background: transparent;
  color: #17793f;
}
.paper-band {
  display: block;
  padding: 22px;
  background: #161514;
  color: #fff;
  text-decoration: none;
  margin: 24px 0;
}
.article-hero {
  padding: 32px 24px;
  margin: 0 -18px 24px;
  min-height: 250px;
}
.article-hero h1 {
  margin: 16px 0 0;
  font-size: 30px;
  line-height: 1.65;
}
.hero-word {
  font-size: 64px;
  line-height: 1.8;
  display: block;
}
.article-copy {
  font-size: 19px;
  line-height: 1.85;
}
.article-copy p {
  margin: 0 0 26px;
}
.article-meta {
  color: #5f5951;
  font-size: 14px;
}
.font-tools {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}
.article-copy.fs-large {
  font-size: 21.4px;
}
.article-copy.fs-largest {
  font-size: 23.75px;
}
.proof {
  margin: 24px 0;
  padding: 16px;
  border: 1px solid #c9c2b4;
}
.proof img {
  width: 100%;
  height: auto;
}
.next-story {
  display: block;
  text-decoration: none;
  color: #161514;
  background: #f3efe5;
  padding: 24px;
  margin: 24px 0;
  border-top: 3px solid #c41320;
}
.more-story {
  display: block;
  min-height: 48px;
  padding: 16px 0;
  border-bottom: 1px solid #c9c2b4;
  font-size: 19px;
}
progress {
  display: block;
  width: 100%;
  height: 4px;
  accent-color: #c41320;
  margin-bottom: 16px;
}
.archive-card {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 20px;
  border-bottom: 1px solid #c9c2b4;
  padding: 24px 0;
}
.archive-card img {
  width: 90px;
  height: auto;
  box-shadow: 0 3px 10px #16151422;
}
.archive-card h2 {
  font-size: 20px;
  margin: 8px 0;
}
.archive-card p {
  font-size: 14px;
  margin: 8px 0;
}
.month-heading {
  font-size: 16px;
  border-bottom: 3px solid #161514;
  padding-bottom: 12px;
  margin-top: 32px;
}
.draft {
  display: inline-block;
  background: #7a1f12;
  color: #fff;
  padding: 4px 8px;
  font-size: 14px;
  line-height: 1.5;
}
.thumb-dock {
  position: fixed;
  inset: auto 0 var(--dock);
  z-index: 5;
  background: #ece6da;
  display: flex;
  gap: 4px;
  padding: 8px 4px;
  min-height: 106px;
  border-top: 1px solid #c9c2b4;
}
.thumb-dock > button {
  flex: 0 0 48px;
  background: #ece6da;
  border: 0;
  font-size: 28px;
}
.thumb-track {
  display: flex;
  gap: 8px;
  overflow: auto;
  flex: 1;
  min-width: 0;
}
.thumb-track a {
  flex: 0 0 48px;
  padding: 3px;
  text-align: center;
  font-size: 14px;
  text-decoration: none;
  border: 2px solid transparent;
}
.thumb-track a[aria-current="page"] {
  border-color: #c41320;
}
.thumb-track img {
  width: 40px;
  height: 56px;
  object-fit: cover;
}
.page-image {
  background: #ece6da;
}
.share-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.share-links a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px;
}
.b-bottom a:focus-visible,
.thumb-track a:focus-visible {
  outline-offset: -4px;
}
body.b-crop .thumb-dock {
  display: none;
}
body.b-crop {
  padding-bottom: calc(var(--dock) + 24px);
}
.b-crop #crop-view .article-hero {
  margin: 0 0 24px;
}
.b-crop .b-bottom {
  font-size: 14px;
}
#b-share a {
  cursor: pointer;
}
#b-share input {
  width: 100%;
}
#b-share-title {
  font-size: 18px;
}
body[data-kind="reader"] header {
  height: auto;
}
body[data-kind="reader"] header .masthead {
  font-size: 26px;
}
.latest-banner {
  position: static;
}
.b-pulse .hotspot {
  animation: hotspot-pulse 1s 2;
}
@keyframes hotspot-pulse {
  50% {
    outline: 2px solid #c41320;
    background: #c4132010;
  }
}
@media (prefers-reduced-motion: reduce) {
  .b-pulse .hotspot {
    animation: none;
  }
}
@media (min-width: 800px) {
  main {
    padding-top: 28px;
  }
  .article-hero {
    padding: 40px;
  }
  .story-card h2 {
    font-size: 34px;
  }
  .archive-card {
    grid-template-columns: 130px minmax(0, 1fr);
  }
  .archive-card img {
    width: 130px;
  }
}

.pill-0 {
  top: 0px;
}
.pill-1 {
  top: 52px;
}
.pill-2 {
  top: 104px;
}
.pill-3 {
  top: 156px;
}
.pill-4 {
  top: 208px;
}
.pill-5 {
  top: 260px;
}
.pill-6 {
  top: 312px;
}
.pill-7 {
  top: 364px;
}
.pill-8 {
  top: 416px;
}
.pill-9 {
  top: 468px;
}
.pill-10 {
  top: 520px;
}
.pill-11 {
  top: 572px;
}
.pill-12 {
  top: 624px;
}
.pill-13 {
  top: 676px;
}
.pill-14 {
  top: 728px;
}
.pill-15 {
  top: 780px;
}
.pill-16 {
  top: 832px;
}
.pill-17 {
  top: 884px;
}
.pill-18 {
  top: 936px;
}
.pill-19 {
  top: 988px;
}
.pill-20 {
  top: 1040px;
}
.pill-21 {
  top: 1092px;
}
.pill-22 {
  top: 1144px;
}
.pill-23 {
  top: 1196px;
}
.pill-24 {
  top: 1248px;
}
.pill-25 {
  top: 1300px;
}
.pill-26 {
  top: 1352px;
}
.pill-27 {
  top: 1404px;
}
.pill-28 {
  top: 1456px;
}
.pill-29 {
  top: 1508px;
}
.pill-30 {
  top: 1560px;
}
.pill-31 {
  top: 1612px;
}
.pill-32 {
  top: 1664px;
}
.pill-33 {
  top: 1716px;
}
.pill-34 {
  top: 1768px;
}
.pill-35 {
  top: 1820px;
}
.pill-36 {
  top: 1872px;
}
.pill-37 {
  top: 1924px;
}
.pill-38 {
  top: 1976px;
}
.pill-39 {
  top: 2028px;
}
.pill-40 {
  top: 2080px;
}
.pill-41 {
  top: 2132px;
}
.pill-42 {
  top: 2184px;
}
.pill-43 {
  top: 2236px;
}
.pill-44 {
  top: 2288px;
}
.pill-45 {
  top: 2340px;
}
.pill-46 {
  top: 2392px;
}
.pill-47 {
  top: 2444px;
}
.pill-48 {
  top: 2496px;
}
.pill-49 {
  top: 2548px;
}
.pill-50 {
  top: 2600px;
}
.pill-51 {
  top: 2652px;
}
.pill-52 {
  top: 2704px;
}
.pill-53 {
  top: 2756px;
}
.pill-54 {
  top: 2808px;
}
.pill-55 {
  top: 2860px;
}
.pill-56 {
  top: 2912px;
}
.pill-57 {
  top: 2964px;
}
.pill-58 {
  top: 3016px;
}
.pill-59 {
  top: 3068px;
}
.pill-60 {
  top: 3120px;
}
.pill-61 {
  top: 3172px;
}
.pill-62 {
  top: 3224px;
}
.pill-63 {
  top: 3276px;
}
.reader-controls input {
  min-width: 0;
  width: 100%;
  flex: 1;
  max-width: 100%;
  padding: 8px;
  border: 1px solid #c9c2b4;
  background: #fffdf8;
  border-radius: 6px;
}
.lead-photo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.photo-hero {
  aspect-ratio: 1 / 1.08;
}
.photo-feed {
  aspect-ratio: 16 / 10;
}
.photo-article {
  aspect-ratio: 1;
}

.dialog-fallback[open] {
  display: block;
  position: fixed;
  z-index: 100;
  inset: auto 0 0;
  margin: 0 auto;
  max-height: 90vh;
  overflow: auto;
  background: #faf7f0;
  border: 2px solid #c9c2b4;
  box-shadow: 0 0 0 100vmax #16151499;
}

.b-share-fallback-open {
  overflow: hidden;
}
.b-share-fallback-open > :not(#b-share) {
  pointer-events: none;
}
/* QA round 1: keyboard clearance, stable crop shell, and compact sharing. */
html {
  scroll-padding-top: 100px;
  scroll-padding-bottom: 200px;
}
main a,
main button {
  scroll-margin-block: 100px 210px;
}
.font-tools button {
  min-width: 48px;
}
.draft {
  white-space: nowrap;
  flex-shrink: 0;
}
h1[tabindex="-1"]:focus,
h2[tabindex="-1"]:focus {
  outline: none;
}
.b-bottom [aria-current="page"] {
  color: #c41320;
  border-top: 3px solid #c41320;
  font-weight: 700;
}
.thumb-dock {
  visibility: hidden;
}
.reader-ready .thumb-dock {
  visibility: visible;
}
.thumb-track img:not([src]) {
  visibility: hidden;
}
body main[data-preview-draft] {
  padding-top: 3.5rem;
}
.latest-banner {
  margin-top: 8px;
}
#b-share {
  padding: 16px;
  max-height: calc(100dvh - 20px);
  max-height: calc(100svh - 20px);
}
#b-share h2 {
  font-size: 20px;
  margin: 0 130px 8px 0;
  min-height: 48px;
  display: flex;
  align-items: center;
}
#b-share-title {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 8px;
  max-height: 3.2em;
  overflow: auto;
}
#b-close {
  position: absolute;
  right: 8px;
  top: 12px;
  min-height: 48px;
  margin: 0;
  font-size: 14px;
}
#b-share .share-primary,
#b-share .share-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
#b-share .button,
#b-share button {
  margin: 0;
  padding: 8px;
  min-height: 48px;
  font-size: 14px;
}
#b-share .share-links {
  justify-content: space-between;
  gap: 4px;
}
#b-share .share-links a {
  font-size: 14px;
  padding: 4px 8px;
}
#b-share label {
  margin: 0;
  font-size: 14px;
}
#b-share input {
  padding: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}
#b-status {
  margin: 0;
  font-size: 14px;
}
#b-status:empty {
  display: none;
}
#b-crop-hero {
  min-height: 250px;
}
body.b-crop #crop-title {
  display: none;
}
.nav-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: block;
}
.b-bottom > a {
  flex-direction: column;
  gap: 2px;
}
.b-header > button {
  width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  padding: 0;
}
.edition-rings img {
  border-radius: 12px;
  border-color: #c9c2b4;
}
.edition-rings [data-latest="true"] img {
  border-color: #c41320;
}
.ring-cover {
  position: relative;
  display: block;
  width: 56px;
  margin: 0 auto 12px;
}
.ring-cover img {
  margin: 0;
}
.latest-badge {
  position: absolute;
  bottom: -6px;
  right: -8px;
  background: #c41320;
  color: white;
  font-size: 14px;
  line-height: 1.6;
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
}
.ring-label {
  display: block;
  line-height: 1.6;
}
.edition-line {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
}
.edition-line > img {
  width: 52px;
  height: auto;
}
.edition-line h1 {
  font-size: 16px;
}
.paper-button {
  min-height: 48px;
  min-width: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #161514;
  color: #fffdf8;
  text-decoration: none;
  font-size: 16px;
  padding: 8px;
  border-radius: 6px;
}
@media (orientation: landscape) and (max-height: 500px) {
  body,
  body[data-kind="reader"],
  body.b-crop {
    --dock: calc(48px + env(safe-area-inset-bottom));
    padding-bottom: calc(var(--dock) + 16px);
  }
  body > header,
  .b-header,
  body[data-kind="reader"] > header {
    position: static;
  }
  .latest-banner,
  body > header p {
    display: none;
  }
  .b-bottom {
    height: var(--dock);
    min-height: var(--dock);
    padding: 0 4px env(safe-area-inset-bottom);
  }
  .b-bottom > a,
  .b-bottom > button {
    min-height: 48px;
    height: 48px;
    padding: 0 4px;
    flex-direction: row;
    gap: 6px;
  }
  .thumb-dock {
    inset: auto 0 0;
    min-height: var(--dock);
    height: var(--dock);
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom)
      env(safe-area-inset-left);
    justify-content: space-between;
    align-items: flex-start;
    background: #fffdf8;
    z-index: 6;
  }
  .thumb-track {
    display: none;
  }
  .thumb-dock > button {
    width: 56px;
    flex: 0 0 56px;
    height: 48px;
    min-height: 48px;
    padding: 0;
  }
  body[data-kind="reader"]:not(.b-crop) .b-bottom {
    left: calc(56px + env(safe-area-inset-left));
    right: calc(56px + env(safe-area-inset-right));
    border-top: 0;
    z-index: 7;
  }
  body.reader-ready .reader-controls {
    display: none;
  }
  html {
    scroll-padding-top: 8px;
    scroll-padding-bottom: 64px;
  }
  main a,
  main button {
    scroll-margin-block: 8px 64px;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .thumb-dock,
  .b-bottom {
    border-top: 0;
    box-shadow: 0 -1px 0 #c9c2b4;
  }
  .b-bottom {
    padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
  }
  body[data-kind="reader"]:not(.b-crop) .b-bottom {
    padding-inline: 4px;
  }
}

/* Photo rows reserve a thumbnail column rather than using the full row width. */
.story-row.has-photo {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
}
.story-row.has-photo .page-tile {
  display: none;
}
.story-row.has-photo h2 {
  min-width: 0;
}
.story-row.has-photo .lead-photo {
  max-width: 100%;
}

/* The early preference decision precedes body parsing and photo hydration. */
html[data-low-data="on"] .lead-photo {
  display: none;
}
.lead-photo[data-photo-src]:not([src]) {
  visibility: hidden;
}

/* Qualifying photo stories lead the feed and use the whole card width. */
.story-card.has-photo {
  padding: 0;
}
.story-card.has-photo .story-copy {
  padding: 16px 24px 24px;
}
.article-hero.has-photo .draft {
  display: table;
  margin: 0;
}
.article-hero .lead-photo {
  margin: 12px 0;
}

/* Integrated photo desk: headline precedes photo; event caption has its own space. */
.feed-item,
.story-card {
  min-width: 0;
  max-width: 100%;
}
.article-hero.has-photo .draft {
  display: inline-block;
  margin-bottom: 12px;
}
.article-hero.has-photo .lead-photo {
  margin-top: 20px;
}
.article-hero.has-photo .kicker {
  margin-bottom: 12px;
}
body[data-kind="article"] .latest-banner {
  padding: 8px 12px;
  margin-bottom: 8px;
}
.article-photo {
  margin: 0;
  width: 100%;
}
.article-photo figcaption {
  margin-top: 12px;
  min-height: 3.4em;
  font-size: 14px;
  line-height: 1.7;
}
html[data-low-data="on"] .article-photo {
  display: none;
}

/* Without a successful early preference script, use the typographic fallback. */
html:not([data-low-data="off"]) .lead-photo,
html:not([data-low-data="off"]) .article-photo {
  display: none;
}

/* Derivatives already carry approved boxes; never crop a second time. */
.lead-photo { object-fit: contain; }
