:root {
  --system-background: #ffffff;
  --secondary-system-background: #f5f5f7;
  --chrome-background: rgba(255, 255, 255, 0.72);
  --label-primary: #1d1d1f;
  --label-secondary: #6e6e73;
  --label-tertiary: #86868b;
  --separator-nonopaque: rgba(60, 60, 67, 0.12);
  --link: #06c;
  --link-hover: #0077ed;
  --selection-bg: rgba(0, 122, 255, 0.18);
  --shadow-skip: 0 4px 24px rgba(0, 0, 0, 0.12);

  --grid-max: 980px;
  --readable-max: 692px;
  --radius-image: 12px;

  --font-stack:
    -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', system-ui, 'Segoe UI', Roboto,
    'Helvetica Neue', Helvetica, Arial, sans-serif;

  --text-callout: 16px;
  --text-body: 17px;
  --text-body-reading: 19px;
  --text-footnote: 13px;
  --text-caption: 12px;

  --sf-symbol-nav-regular: 20px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --system-background: #000000;
    --secondary-system-background: #1c1c1e;
    --chrome-background: rgba(28, 28, 30, 0.76);
    --label-primary: #f5f5f7;
    --label-secondary: #a1a1a6;
    --label-tertiary: #8e8e93;
    --separator-nonopaque: rgba(255, 255, 255, 0.15);
    --link: #2997ff;
    --link-hover: #5eb0ff;
    --selection-bg: rgba(10, 132, 255, 0.35);
    --shadow-skip: 0 4px 28px rgba(0, 0, 0, 0.55);
  }
}

:root[data-theme='dark'] {
  --system-background: #000000;
  --secondary-system-background: #1c1c1e;
  --chrome-background: rgba(28, 28, 30, 0.76);
  --label-primary: #f5f5f7;
  --label-secondary: #a1a1a6;
  --label-tertiary: #8e8e93;
  --separator-nonopaque: rgba(255, 255, 255, 0.15);
  --link: #2997ff;
  --link-hover: #5eb0ff;
  --selection-bg: rgba(10, 132, 255, 0.35);
  --shadow-skip: 0 4px 28px rgba(0, 0, 0, 0.55);
}

:root[data-theme='light'] {
  --system-background: #ffffff;
  --secondary-system-background: #f5f5f7;
  --chrome-background: rgba(255, 255, 255, 0.72);
  --label-primary: #1d1d1f;
  --label-secondary: #6e6e73;
  --label-tertiary: #86868b;
  --separator-nonopaque: rgba(60, 60, 67, 0.12);
  --link: #06c;
  --link-hover: #0077ed;
  --selection-bg: rgba(0, 122, 255, 0.18);
  --shadow-skip: 0 4px 24px rgba(0, 0, 0, 0.12);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-stack);
  font-size: var(--text-body);
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.022em;
  color: var(--label-primary);
  background: var(--system-background);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

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

.skip-link:focus {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 0px));
  left: max(12px, env(safe-area-inset-left, 0px));
  z-index: 1000;
  width: auto;
  height: auto;
  margin: 0;
  padding: 12px 16px;
  clip: auto;
  background: var(--system-background);
  border-radius: 12px;
  box-shadow: var(--shadow-skip);
  font-size: var(--text-footnote);
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
}

.global-nav__primary {
  margin: 0;
  padding: 0;
}

.global-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: calc(48px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--chrome-background);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--separator-nonopaque);
}

.global-nav__inner {
  max-width: var(--grid-max);
  margin: 0 auto;
  min-height: 48px;
  padding: 0 max(22px, env(safe-area-inset-right)) 0 max(22px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.global-nav__brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 4px;
  margin-left: -4px;
  color: var(--label-primary);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.global-nav__brand-mark {
  display: block;
  flex-shrink: 0;
  height: 22px;
  width: auto;
  aspect-ratio: 755 / 700;
}

.global-nav__brand:hover {
  opacity: 0.65;
}

.global-nav__brand:active {
  opacity: 0.45;
}

.global-nav__tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.global-nav__tagline {
  margin: 0;
  font-size: var(--text-caption);
  line-height: 1.33337;
  letter-spacing: -0.01em;
  font-weight: 400;
  color: var(--label-secondary);
  text-align: right;
}

.sf-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--label-primary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 0.2s ease,
    transform 0.22s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.theme-toggle:hover {
  background: color-mix(in srgb, var(--label-primary) 10%, transparent);
}

@supports not (background: color-mix(in srgb, black 10%, transparent)) {
  .theme-toggle:hover {
    background: var(--separator-nonopaque);
  }
}

.theme-toggle:active:not(:disabled) {
  transform: scale(0.94);
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle {
    transition: background-color 0.2s ease;
  }

  .theme-toggle:active:not(:disabled) {
    transform: none;
  }
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.theme-toggle__sf {
  display: block;
  width: var(--sf-symbol-nav-regular);
  height: var(--sf-symbol-nav-regular);
  flex-shrink: 0;
  pointer-events: none;
}

.theme-toggle__sf--sun {
  display: none;
}

.theme-toggle--is-dark .theme-toggle__sf--moon {
  display: none;
}

.theme-toggle--is-dark .theme-toggle__sf--sun {
  display: block;
}

@media (forced-colors: active) {
  .theme-toggle__sf {
    forced-color-adjust: auto;
  }
}

.main {
  flex: 1;
  width: 100%;
  max-width: var(--grid-max);
  margin: 0 auto;
  padding: 44px max(22px, env(safe-area-inset-right)) 64px max(22px, env(safe-area-inset-left));
}

@media (min-width: 734px) {
  .main {
    padding-top: 56px;
    padding-bottom: 88px;
  }
}

.state {
  text-align: center;
  color: var(--label-secondary);
  padding: 88px 16px;
  font-size: var(--text-callout);
  letter-spacing: -0.022em;
}

.state--loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: min(52vh, 360px);
  padding: max(72px, 12vh) 24px max(48px, env(safe-area-inset-bottom, 0px));
}

.state__spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid var(--separator-nonopaque);
  border-top-color: var(--link);
  flex-shrink: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .state__spinner {
    animation: dbh-loading-spin 0.75s linear infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  .state__spinner {
    opacity: 0.65;
    border-top-color: var(--separator-nonopaque);
  }
}

@keyframes dbh-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.state__msg {
  margin: 0;
  max-width: 22em;
  font-size: var(--text-callout);
  line-height: 1.4;
  letter-spacing: -0.022em;
  color: var(--label-secondary);
}

.state.error {
  color: #ac2847;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .state.error {
    color: #ff6482;
  }
}

:root[data-theme='dark'] .state.error {
  color: #ff6482;
}

.section-head {
  margin-bottom: 40px;
}

@media (min-width: 734px) {
  .section-head {
    margin-bottom: 48px;
  }
}

.section-title {
  margin: 0;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.125;
  letter-spacing: -0.015em;
  color: var(--label-primary);
  text-rendering: optimizeLegibility;
}

@media (min-width: 734px) {
  .section-title {
    font-size: 48px;
    letter-spacing: -0.024em;
    line-height: 1.08349;
  }
}

.story-grid {
  display: grid;
  gap: 44px 32px;
  grid-template-columns: 1fr;
}

@media (min-width: 734px) {
  .story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 56px 36px;
  }
}

.story {
  display: block;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.story:hover .story-headline {
  color: var(--link);
}

.story:hover .story-media img {
  transform: scale(1.015);
  opacity: 0.94;
}

.story--featured {
  padding-bottom: 44px;
  margin-bottom: 4px;
  border-bottom: 0.5px solid var(--separator-nonopaque);
}

@media (min-width: 734px) {
  .story--featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.12fr 1fr;
    gap: 44px;
    align-items: center;
    padding-bottom: 56px;
    margin-bottom: 12px;
    border-bottom: none;
  }

  .story--featured::after {
    content: '';
    grid-column: 1 / -1;
    height: 0.5px;
    background: var(--separator-nonopaque);
    margin-top: 4px;
  }
}

.story-media {
  border-radius: var(--radius-image);
  overflow: hidden;
  background: var(--secondary-system-background);
  aspect-ratio: 16 / 10;
}

.story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.35s ease;
}

.story-media--pending {
  background: var(--secondary-system-background);
}

@media (prefers-reduced-motion: no-preference) {
  .story-media--pending {
    animation: dbh-placeholder-pulse 1s ease-in-out infinite alternate;
  }
}

@keyframes dbh-placeholder-pulse {
  from {
    opacity: 1;
  }

  to {
    opacity: 0.72;
  }
}

.list-more {
  display: flex;
  justify-content: center;
  margin-top: 48px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.list-more__btn {
  min-height: 44px;
  padding: 0 24px;
  border: none;
  border-radius: 999px;
  font-family: var(--font-stack);
  font-size: var(--text-footnote);
  font-weight: 600;
  letter-spacing: -0.016em;
  color: var(--link);
  background: color-mix(in srgb, var(--label-primary) 8%, transparent);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s ease;
}

.list-more__btn:hover:not(:disabled) {
  opacity: 0.88;
}

.list-more__btn:disabled {
  opacity: 0.45;
  cursor: default;
}

@supports not (background: color-mix(in srgb, black 8%, transparent)) {
  .list-more__btn {
    background: var(--separator-nonopaque);
  }
}

.story-copy {
  padding-top: 16px;
}

@media (min-width: 734px) {
  .story--featured .story-copy {
    padding-top: 0;
    padding-right: 8px;
  }
}

.story-date {
  margin-bottom: 8px;
  font-size: var(--text-footnote);
  line-height: 1.38462;
  letter-spacing: -0.016em;
  color: var(--label-secondary);
}

.story-headline {
  margin: 0 0 12px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.19048;
  letter-spacing: -0.022em;
  color: var(--label-primary);
  transition: color 0.2s ease;
  text-rendering: optimizeLegibility;
}

@media (min-width: 734px) {
  .story-headline {
    font-size: 24px;
    line-height: 1.16667;
  }

  .story--featured .story-headline {
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.024em;
    margin-bottom: 16px;
  }
}

.story-deck {
  margin: 0;
  font-size: var(--text-callout);
  line-height: 1.5;
  letter-spacing: -0.022em;
  color: var(--label-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 734px) {
  .story--featured .story-deck {
    font-size: var(--text-body-reading);
    line-height: 1.42105;
    letter-spacing: -0.011em;
    -webkit-line-clamp: 4;
  }
}

.article {
  max-width: var(--readable-max);
  margin: 0 auto;
}

.article-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  margin-bottom: 28px;
}

.article-toolbar > .article-back--toolbar,
.article-toolbar > .article-jump-comments {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-back--toolbar {
  margin-bottom: 0;
  justify-self: start;
  max-width: 100%;
}

.article-jump-comments {
  margin: 0;
  margin-right: -4px;
  padding: 0 4px;
  justify-self: end;
  max-width: 100%;
  min-height: 44px;
  font: inherit;
  font-size: var(--text-callout);
  line-height: 1.5;
  letter-spacing: -0.022em;
  font-weight: 400;
  color: var(--link);
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  text-align: right;
}

.article-jump-comments:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.article-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 28px;
  padding: 0 4px;
  margin-left: -4px;
  font-size: var(--text-callout);
  line-height: 1.5;
  letter-spacing: -0.022em;
  font-weight: 400;
  color: var(--link);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.article-back:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.article-back--footer {
  margin-top: 40px;
  margin-bottom: 0;
}

@media (min-width: 734px) {
  .article-back--footer {
    margin-top: 48px;
  }
}

.article-hero {
  margin-bottom: 40px;
  border-radius: var(--radius-image);
  overflow: hidden;
  background: var(--secondary-system-background);
  aspect-ratio: 16 / 9;
}

.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-hero--pending {
  background: var(--secondary-system-background);
}

@media (prefers-reduced-motion: no-preference) {
  .article-hero--pending {
    animation: dbh-placeholder-pulse 1s ease-in-out infinite alternate;
  }
}

.article-title {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.125;
  letter-spacing: -0.015em;
  color: var(--label-primary);
  text-rendering: optimizeLegibility;
}

@media (min-width: 734px) {
  .article-title {
    font-size: 40px;
    line-height: 1.1;
    letter-spacing: -0.019em;
  }
}

.article-meta {
  margin-bottom: 40px;
  font-size: var(--text-footnote);
  line-height: 1.38462;
  letter-spacing: -0.016em;
  color: var(--label-secondary);
}

.article-body {
  font-size: var(--text-body-reading);
  line-height: 1.42105;
  letter-spacing: -0.011em;
  font-weight: 400;
  color: var(--label-primary);
}

.article-body > *:first-child {
  margin-top: 0;
}

.article-body p {
  margin: 0 0 1.05em;
}

.article-body h2,
.article-body h3 {
  margin: 1.4em 0 0.65em;
  font-size: var(--text-body-reading);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--label-primary);
}

.article-body strong {
  font-weight: 600;
}

.article-body figure {
  margin: 1.75em 0;
}

.article-body figcaption {
  margin-top: 10px;
  font-size: var(--text-footnote);
  line-height: 1.38462;
  color: var(--label-tertiary);
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-image);
}

.article-body .wp-block-image img,
.article-body .wp-block-gallery img {
  border-radius: var(--radius-image);
}

.article-body a {
  color: var(--link);
  text-decoration: none;
}

.article-body a:hover {
  text-decoration: underline;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.article-body blockquote {
  margin: 1.25em 0;
  padding-left: 1em;
  border-left: 3px solid var(--separator-nonopaque);
  color: var(--label-secondary);
}

.article-comments {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--separator-nonopaque);
}

@media (min-width: 734px) {
  .article-comments {
    margin-top: 56px;
    padding-top: 40px;
  }
}

.article-comments__title {
  margin: 0 0 24px;
  font-size: var(--text-body-reading);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--label-primary);
  scroll-margin-top: 88px;
}

.article-comments__empty {
  margin: 0;
  font-size: var(--text-callout);
  line-height: 1.5;
  letter-spacing: -0.022em;
  color: var(--label-secondary);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.comment {
  font-size: var(--text-callout);
  line-height: 1.5;
  letter-spacing: -0.022em;
  color: var(--label-primary);
}

.comment__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.comment__avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--secondary-system-background);
}

.comment__avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment__avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary-system-background);
  color: var(--label-secondary);
}

.comment__avatar-initial {
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.comment__grow {
  flex: 1;
  min-width: 0;
}

.comment__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.comment__author {
  font-weight: 600;
  color: var(--label-primary);
}

.comment__date {
  font-size: var(--text-footnote);
  line-height: 1.38462;
  letter-spacing: -0.016em;
  color: var(--label-tertiary);
}

.comment__body > *:first-child {
  margin-top: 0;
}

.comment__body p {
  margin: 0 0 0.75em;
}

.comment__body a {
  color: var(--link);
  text-decoration: none;
}

.comment__body a:hover {
  text-decoration: underline;
}

.comment__body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-image);
}

.comment-replies {
  margin-top: 16px;
  margin-left: calc(44px + 12px);
  padding-left: 14px;
  border-left: 2px solid var(--separator-nonopaque);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 734px) {
  .comment-replies {
    padding-left: 18px;
  }
}

::selection {
  background: var(--selection-bg);
}
