/* A visible, native directory: every work is discoverable before the long story. */
.works-intro { padding-bottom: 23px; }
.works-intro p { text-wrap: balance; }
.works-intro p > span { display: inline-block; }
.work-directory { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 1536px; margin: 0 auto; padding: 0 56px 30px; gap: 6px; }
.directory-item { display: flex; align-items: center; gap: 12px; min-height: 92px; padding: 16px 12px; border-radius: 16px; transition: background .25s, translate .25s; }
.directory-item .app-icon { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 4px 9px -5px #1d30494d; }
.directory-item .app-icon svg { width: 29px; height: 29px; }
.directory-item .project-monogram { font-size: 18px; }
.directory-copy { min-width: 0; display: grid; gap: 5px; }
.directory-copy b { font-size: 14px; font-weight: 550; letter-spacing: -.025em; line-height: 1.35; }
.directory-copy > span { font-size: 12px; color: #646d7a; line-height: 1.5; }
.directory-item > svg { width: 15px; height: 15px; flex-shrink: 0; margin-left: auto; color: #717b89; rotate: 90deg; transition: translate .25s, color .25s; }
.directory-item:hover, .directory-item:focus-visible { background: #f3f6fa; }
.directory-item:hover > svg { color: #0071e3; translate: 0 2px; }
.chapter-catalog { display: inline-flex; align-items: center; min-height: 44px; color: #596574; letter-spacing: .03em; }
.chapter-catalog .project-kind { margin-left: 14px; font-size: 12px; border-bottom: 1px solid transparent; transition: border-color .25s; }
.chapter-catalog:hover .project-kind { border-color: currentColor; }
.theme-dark .chapter-catalog { color: #aeb7c5; }

/* Secondary text should read as quiet, not faded, at every preview size. */
.chapter .preview-small, .chapter .preview-brand > span { color: #66707c; }
.chapter .phone-top > span, .chapter .phone-nav, .chapter .mini-week,
.chapter .activity-ring small, .chapter .workout-tile span, .chapter .lian-note p { color: #656d5c; }
.chapter .ma-top, .chapter .ma-kicker, .chapter .ma-bottom { color: #7a6759; }
.chapter .ma-example > span, .chapter .ma-translation { color: #786c62; }
.chapter .session-label, .chapter .code-row > span:last-child, .chapter .monitor-summary { color: #5d786e; }
.chapter .ai-timeline p { color: #a4adbd; }
.chapter .ai-timeline small { color: #a6aec0; }

@media (min-width: 1000px) {
  .hero { padding-top: 112px; padding-bottom: 46px; }
  .work-directory { padding-bottom: 20px; }
}

@media (max-width: 1279px) and (min-width: 1000px) {
  .work-directory { padding-left: 32px; padding-right: 32px; }
  .directory-item { gap: 10px; padding-left: 8px; padding-right: 8px; }
  .directory-item > svg { display: none; }
  .directory-copy b { font-size: 13px; }
}
@media (max-width: 999px) {
  .work-directory { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0 32px 26px; }
  .directory-item { min-height: 80px; }
}
@media (max-width: 600px) {
  .works-intro { padding-bottom: 12px; }
  .works-intro p { font-size: 14px; max-width: none; }
  .works-count { font-size: 12px; }
  .work-directory { display: flex; flex-direction: column; gap: 0; padding: 0 24px 24px; }
  .directory-item { min-height: 59px; padding: 11px 0; border-radius: 0; border-bottom: 1px solid #edf0f3; gap: 13px; }
  .directory-item:last-child { border-bottom: 0; }
  .directory-item:hover, .directory-item:focus-visible { background: transparent; }
  .directory-item .app-icon { width: 32px; height: 32px; border-radius: 9px; }
  .directory-item .app-icon svg { width: 25px; height: 25px; }
  .directory-copy { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .directory-copy b { font-size: 14px; }
  .directory-copy > span { font-size: 12px; white-space: nowrap; }
  .directory-item > svg { width: 14px; height: 14px; margin-left: 0; }
  .chapter-catalog .project-kind { font-size: 11px; margin-left: 10px; }
  .chapter .preview-caption { font-size: 11px; letter-spacing: .04em; }
  .chapter .window-bar { height: 34px; }
  .chapter .window-title { font-size: 11px; }

  /* Atlas becomes a destination card and a wide map, not a shrunken desktop. */
  .chapter .atlas-layout { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .chapter .atlas-overview { padding: 20px; }
  .chapter .atlas-overview .preview-brand { font-size: 22px; }
  .chapter .atlas-overview .preview-brand > span { font-size: 11px; }
  .chapter .atlas-overview > .preview-small, .chapter .preview-tabs, .chapter .discovery-row { display: none; }
  .chapter .atlas-overview h3 { font-size: 23px; margin: 10px 0 17px; white-space: normal; }
  .chapter .travel-photo { height: 165px; border-radius: 9px; }
  .chapter .travel-photo > span { left: 14px; bottom: 13px; font-size: 16px; }
  .chapter .travel-photo small { font-size: 11px; margin-top: 5px; }
  .chapter .atlas-map { height: 185px; border-top: 1px solid #e5edf0; }
  .chapter .atlas-map > img { object-position: center 48%; }
  .chapter .map-bubble { font-size: 11px; padding: 6px 10px 6px 6px; gap: 6px; }
  .chapter .map-bubble > span { width: 23px; height: 23px; font-size: 10px; }
  .chapter .bubble-one { top: 13%; left: 10%; }
  .chapter .bubble-two { top: 40%; right: 7%; }
  .chapter .bubble-three { top: 66%; left: 15%; }
  .chapter .map-caption { display: none; }

  .chapter .phone-top > span, .chapter .phone-content > .preview-small, .chapter .activity-ring > div > span,
  .chapter .activity-ring small, .chapter .workout-tile span, .chapter .mini-week > span, .chapter .phone-nav, .chapter .lian-note p { font-size: 11px; }
  .chapter .workout-tile strong { font-size: 12px; }
  .chapter .lian-composition { flex-direction: column; min-height: 0; padding-top: 10px; }
  .chapter .lian-note { position: relative; right: auto; bottom: auto; align-self: flex-end; margin-top: 12px; transform: rotate(0); }
  .chapter .ma-composition { height: auto; flex-direction: column; padding-top: 10px; }
  .chapter .ma-float { position: relative; left: auto; bottom: auto; align-self: flex-start; margin-top: 18px; margin-left: 8px; width: 190px; height: 82px; display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 46px; transform: rotate(-4deg); }
  .chapter .ma-top, .chapter .ma-kicker, .chapter .ma-bottom, .chapter .ma-float > span { font-size: 11px; }
  .chapter .ma-translation, .chapter .ma-example > span { font-size: 12px; }

  /* Monitor focuses on its three-stage workflow instead of a miniature sidebar. */
  .chapter .monitor-sidebar { display: none; }
  .chapter .monitor-layout { min-height: 0; }
  .chapter .monitor-main { padding: 25px 20px 22px; width: 100%; }
  .chapter .monitor-main .preview-brand { font-size: 20px; }
  .chapter .monitor-main .preview-brand > span { display: none; }
  .chapter .monitor-main > .preview-small { font-size: 12px; line-height: 1.65; margin-top: 10px; }
  .chapter .monitor-panels { margin-top: 23px; }
  .chapter .session-card { padding: 17px; }
  .chapter .session-label { font-size: 10px; }
  .chapter .session-card h3 { font-size: 20px; margin: 15px 0 19px; }
  .chapter .code-row { padding: 19px 0; gap: 10px; }
  .chapter .code-row > b { font-size: 13px; }
  .chapter .code-row > span:last-child { font-size: 10px; }
  .chapter .monitor-summary { font-size: 11px; margin-top: 22px; padding-top: 18px; gap: 12px; }

  .chapter .ai-follow, .chapter .radar-label, .chapter .ai-timeline small { font-size: 11px; }
  .chapter .ai-inner h3 { font-size: 13px; }
  .chapter .ai-timeline b { font-size: 15px; }
  .chapter .ai-timeline p { font-size: 12px; line-height: 1.7; }
}
@media (max-width: 360px) {
  .work-directory { padding-left: 20px; padding-right: 20px; }
  .directory-item { gap: 10px; }
  .directory-copy b { font-size: 13px; }
  .directory-copy > span { font-size: 11px; }
  .chapter .monitor-main { padding-left: 17px; padding-right: 17px; }
  .chapter .monitor-main .preview-brand { font-size: 19px; }
  .chapter .session-card { padding: 14px; }
  .chapter .ma-top { font-size: 10px; }
  .chapter .ai-inner { padding-left: 20px; padding-right: 20px; }
  .chapter .ai-title { font-size: 23px; }
  .chapter .ai-follow { margin-left: 6px; }
  .chapter .radar-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .chapter .ma-float { transform: none; }
}
