:root {
  color-scheme: light dark;
  --hz-bg: #f5f5f7;
  --hz-surface: #ffffff;
  --hz-surface-muted: #f5f5f7;
  --hz-text: #1d1d1f;
  --hz-text-muted: #6e6e73;
  --hz-link: #0066cc;
  --hz-link-hover: #004f9e;
  --hz-border: rgba(0, 0, 0, 0.12);
  --hz-header: rgba(255, 255, 255, 0.82);
  --hz-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  --hz-radius: 24px;
  --hz-tab-active: #1d1d1f;
  --hz-tab-active-text: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --hz-bg: #000000;
    --hz-surface: #1c1c1e;
    --hz-surface-muted: #2c2c2e;
    --hz-text: #f5f5f7;
    --hz-text-muted: #a1a1a6;
    --hz-link: #2997ff;
    --hz-link-hover: #64b5ff;
    --hz-border: rgba(255, 255, 255, 0.16);
    --hz-header: rgba(28, 28, 30, 0.82);
    --hz-shadow: none;
    --hz-tab-active: #f5f5f7;
    --hz-tab-active-text: #1d1d1f;
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--hz-bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--hz-bg) !important;
  color: var(--hz-text) !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif !important;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--hz-link) !important;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--hz-link-hover) !important;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--hz-link);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--hz-text) !important;
  font-family: inherit !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em;
}

code {
  background: var(--hz-surface-muted) !important;
  color: var(--hz-text) !important;
}

pre {
  overflow-x: auto;
  background: var(--hz-surface-muted) !important;
  color: var(--hz-text) !important;
  border: 1px solid var(--hz-border) !important;
  border-radius: 14px;
}

hr {
  border-color: var(--hz-border) !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--hz-text);
  color: var(--hz-bg) !important;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--hz-border);
  background: var(--hz-header);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.site-header-inner,
.site-footer-inner {
  display: flex;
  width: min(1080px, calc(100% - 64px));
  margin: 0 auto;
}

.site-header-inner {
  min-height: 104px;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.site-title {
  flex: 0 0 auto;
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.site-title a,
a.site-title {
  color: var(--hz-text) !important;
  text-decoration: none;
}

.site-tagline {
  max-width: 520px;
  margin: 0;
  color: var(--hz-text-muted);
  font-size: clamp(0.92rem, 1.8vw, 1.08rem);
  line-height: 1.5;
  text-align: right;
}

.main-content {
  width: min(980px, calc(100% - 64px));
  max-width: none;
  min-height: calc(100vh - 190px);
  margin: 0 auto;
  padding: 64px 0 88px;
  color: var(--hz-text);
  font-size: inherit;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--hz-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.4;
}

.section-heading h2,
.archive-heading h1 {
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.latest-date {
  margin: 10px 0 0;
  color: var(--hz-text-muted);
  font-size: 0.92rem;
}

.history-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
  padding: 8px 0 8px 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.history-link svg,
.digest-archive-item svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  transition: transform 160ms ease;
}

.history-link:hover svg,
.digest-archive-item:hover svg {
  transform: translateX(3px);
}

.latest-digest-content {
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  background: var(--hz-surface);
  box-shadow: var(--hz-shadow);
}

.latest-digest-content > :first-child {
  margin-top: 0;
}

.latest-digest-content > :last-child {
  margin-bottom: 0;
}

.latest-digest-content h3 {
  margin-top: 2.4em;
  font-size: clamp(1.28rem, 2.5vw, 1.65rem);
  line-height: 1.35;
}

.latest-digest-content h4 {
  margin-top: 1.8em;
  font-size: 1.08rem;
  line-height: 1.45;
}

.latest-digest-content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}

.latest-digest-content > ol,
.content-page .main-content > ol {
  padding: 20px 24px 20px 46px;
  border: 0;
  border-radius: 16px;
  background: var(--hz-surface-muted);
}

.latest-digest-content > ol > li,
.content-page .main-content > ol > li {
  padding: 4px 0;
}

.latest-digest-content > blockquote:first-of-type,
.content-page .main-content > blockquote:first-of-type {
  margin: 0 0 28px;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--hz-link);
  color: var(--hz-text-muted);
  font-style: normal;
}

.score-badge {
  display: inline-flex;
  min-width: 2.8em;
  min-height: 1.8em;
  align-items: center;
  justify-content: center;
  margin-left: 0.45em;
  padding: 0.1em 0.55em;
  border-radius: 999px;
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68em;
  font-weight: 700;
  letter-spacing: 0;
  vertical-align: middle;
}

.score-badge[data-tier="high"] { background: #1d1d1f; }
.score-badge[data-tier="good"] { background: #0066cc; }
.score-badge[data-tier="mid"]  { background: #9a6700; }
.score-badge[data-tier="low"]  { background: #6e6e73; }

@media (prefers-color-scheme: dark) {
  .score-badge[data-tier="high"] { background: #f5f5f7; color: #1d1d1f; }
  .score-badge[data-tier="good"] { background: #0a84ff; }
  .score-badge[data-tier="mid"]  { background: #ac7b00; }
}

.tag-line code {
  padding: 0.2em 0.65em;
  border-radius: 999px;
  background: var(--hz-surface-muted) !important;
  color: var(--hz-text-muted) !important;
  font-size: 0.78em;
}

.source-line {
  padding-left: 0;
  border-left: 0;
  color: var(--hz-text-muted);
  font-size: 0.84em;
}

.main-content details {
  margin: 16px 0;
  border: 1px solid var(--hz-border);
  border-radius: 14px;
  overflow: hidden;
}

.main-content details summary {
  min-height: 44px;
  padding: 9px 14px;
  color: var(--hz-text-muted);
  cursor: pointer;
  font-weight: 600;
}

.main-content details > ul {
  margin: 0;
  padding: 10px 18px 18px 38px;
}

.archive-divider {
  margin-top: 48px;
}

.archive-tabs {
  margin-top: 32px;
}

.archive-intro,
.archive-empty {
  color: var(--hz-text-muted);
}

.archive-tablist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
  padding: 5px;
  border-radius: 14px;
  background: var(--hz-surface-muted);
}

.archive-tablist button {
  min-height: 44px;
  padding: 9px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--hz-text);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  line-height: 1.35;
  touch-action: manipulation;
  transition: background-color 160ms ease, color 160ms ease;
}

.archive-tablist button[aria-selected="true"] {
  background: var(--hz-tab-active);
  color: var(--hz-tab-active-text);
}

.archive-tab-count {
  display: inline-flex;
  min-width: 1.7em;
  min-height: 1.7em;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 0 0.35em;
  border-radius: 999px;
  background: rgba(128, 128, 128, 0.18);
  font-size: 0.78em;
  font-variant-numeric: tabular-nums;
}

.archive-panel {
  padding: 8px 0;
}

.archive-tabs:not(.is-enhanced) .archive-panel + .archive-panel {
  margin-top: 16px;
}

.archive-tabs.is-enhanced .archive-panel-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.archive-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--hz-border);
}

.archive-item:first-of-type { padding-top: 8px; }
.archive-item:last-child { padding-bottom: 0; border-bottom: 0; }

.archive-item-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.archive-item-heading h3,
.archive-item-heading h4 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
}

.archive-item-heading .score-badge {
  flex: 0 0 auto;
  margin-top: 3px;
}

.archive-item .source-line { margin: 10px 0; }

.archive-item-translation {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--hz-link);
  border-radius: 0 10px 10px 0;
  background: var(--hz-surface-muted);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.archive-item-translation span {
  display: inline-block;
  margin-right: 9px;
  color: var(--hz-text-muted);
  font-size: 0.82em;
  font-weight: 700;
}

.archive-title-translation { margin-top: 7px; }
.archive-item-content { margin-bottom: 0; line-height: 1.7; overflow-wrap: anywhere; }

.archive-heading {
  margin-bottom: 36px;
}

.archive-heading > p:last-child {
  margin: 14px 0 0;
  color: var(--hz-text-muted);
}

.digest-archive {
  display: block;
  overflow: hidden;
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  background: var(--hz-surface);
  box-shadow: var(--hz-shadow);
}

.digest-archive-item {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--hz-border);
  color: var(--hz-text) !important;
  font-weight: 600;
  text-decoration: none;
}

.digest-archive-item:last-child { border-bottom: 0; }
.digest-archive-item:hover { background: var(--hz-surface-muted); }
.digest-archive-item svg { color: var(--hz-text-muted); }

.empty-state {
  padding: 28px;
  border: 1px solid var(--hz-border);
  border-radius: 18px;
  background: var(--hz-surface);
  color: var(--hz-text-muted);
}

.site-footer {
  border-top: 1px solid var(--hz-border);
  color: var(--hz-text-muted);
  font-size: 0.82rem;
}

.site-footer-inner {
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  text-decoration: none;
}

@media (max-width: 700px) {
  body { font-size: 16px; }

  .site-header-inner,
  .site-footer-inner,
  .main-content {
    width: min(100% - 40px, 980px);
  }

  .site-header-inner {
    min-height: 116px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
  }

  .site-tagline {
    max-width: none;
    text-align: left;
  }

  .main-content {
    padding: 44px 0 64px;
  }

  .section-heading {
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 22px;
  }

  .history-link span { font-size: 0.9rem; }
  .latest-digest-content { border-radius: 20px; }
}

@media (max-width: 480px) {
  .site-header-inner,
  .site-footer-inner,
  .main-content {
    width: calc(100% - 32px);
  }

  .latest-digest-content {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .archive-tablist { grid-template-columns: 1fr; }
  .archive-item-heading { display: block; }
  .archive-item-heading .score-badge { margin: 7px 0 0; }

  .site-footer-inner {
    min-height: 112px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0;
  }
}

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

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--hz-surface);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
