html,
body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: clip;
}

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

html {
  scroll-behavior: auto;
  text-size-adjust: 100%;
}

body { min-width: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

button,
select,
input { font: inherit; }

button,
select { max-width: 100%; }

p,
li,
a,
span,
code,
pre,
blockquote,
summary,
.meta,
.body,
.comment-body,
.comment,
.debug {
  overflow-wrap: anywhere;
  word-break: normal;
}

pre {
  max-width: 100%;
  margin: .7rem 0 0;
  white-space: pre-wrap;
  word-break: break-word;
}

img,
picture,
video,
iframe,
svg,
canvas,
object,
embed {
  display: block;
  max-width: 100%;
  height: auto;
}

.review-container {
  width: min(calc(100% - (2 * var(--edge))), var(--reader-width));
  min-width: 0;
  margin-inline: auto;
  transition: width 160ms ease;
}

.summary { padding-block: 2rem 1.2rem; }
.summary h1 { margin: 0 0 .35rem; font-size: clamp(1.8rem, 6vw, 2.65rem); line-height: 1.1; }
.summary > p { margin: .5rem 0 1.25rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: .55rem;
}

.stat { min-width: 0; padding: .7rem; }
.jump { display: flex; flex-wrap: wrap; gap: .35rem .7rem; align-items: baseline; }
.jump a { padding-block: .15rem; }

.timeline { padding-bottom: 3rem; }
.year-marker { scroll-margin-top: 15rem; margin: 2rem 0 .8rem; }
.year-marker span { display: inline-block; padding: .2rem .55rem; }

.post {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0 0 var(--reader-post-gap);
  padding: var(--reader-post-padding);
  scroll-margin-top: 15rem;
  content-visibility: auto;
  contain-intrinsic-size: auto 780px;
}

.post h2 {
  max-width: 100%;
  margin: 0 0 .4rem;
  overflow-wrap: anywhere;
}

.labels,
.warnings {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: .35rem;
  margin-top: .65rem;
}

.labels:empty,
.warnings:empty { display: none; }

.label,
.warning {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.body,
.comments,
.comment,
.debug { width: 100%; min-width: 0; max-width: 100%; }

.body { margin-top: 1.35rem; }
.body > :first-child { margin-top: 0; }
.body img { margin: 1rem auto; object-fit: contain; }
.body .hero-image { width: auto; max-width: 100%; margin: 1.15rem auto 1.4rem; }
.body figure { max-width: 100%; margin: 1.2rem auto; }
.body figcaption { text-align: center; }
.body blockquote { max-width: 100%; margin: 1rem 0; padding-left: 1rem; }
.body ol,
.body ul,
.comment ol,
.comment ul { max-width: 100%; padding-left: 1.6rem; }
.playlist li { margin-bottom: .35rem; }
.song-credit { margin-top: 1.4rem; padding-left: 1rem; }

.table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.table-wrapper table { width: max-content; max-width: none; border-collapse: collapse; }
.table-wrapper td,
.table-wrapper th { max-width: 32rem; padding: .3rem .45rem; vertical-align: top; }

.embed-wrapper { width: 100%; max-width: 100%; overflow: hidden; }
.embed-wrapper iframe,
.embed-wrapper video { width: 100%; aspect-ratio: 16 / 9; }

.comments { margin-top: 2rem; padding-top: 1rem; }
.comments h3 { margin: 0 0 .9rem; }
.comment { margin: 1rem 0; padding-left: clamp(.65rem, 3vw, 1rem); }
.comment-meta { margin-bottom: .35rem; }
.comment-body > :first-child { margin-top: 0; }

.post-footer {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  align-items: baseline;
  margin-top: 1.5rem;
}

.original { margin: 0; }
.permalink { margin-left: auto; }
.debug { margin-top: .9rem; padding: .65rem; }
.debug summary { cursor: pointer; }
.site-footer { padding: 1rem 0 3rem; }
.hidden,
[hidden] { display: none !important; }

body[data-view="calendar"] #archiveTimeline,
body[data-view="calendar"] .summary { display: none; }

body[data-view="timeline"] #calendarView { display: none; }

@media (max-width: 700px) {
  :root { --edge: 1rem; }
  .summary { padding-top: 1.35rem; }
  .post,
  .year-marker { scroll-margin-top: 15rem; }
  .post-footer { align-items: flex-start; }
  .permalink { margin-left: 0; }
}

@media (max-width: 360px) {
  .post { padding: min(var(--reader-post-padding), .95rem); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
  }
}
