/* Content adaptations only. The original desktop presentation remains intact. */
@media screen and (max-width: 959px) {
  #han-research, #han-teaching, #han-publications, #han-software {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  #han-research { font-size: 16px; line-height: 1.75; }
  #han-research .eyebrow { font-size: 11px; }
  #han-research .lead { font-size: 18px; }
  #han-research .thesis { font-size: 16px; }
  #han-research .impact-label { font-size: 14px; }
  #han-research .impact-note .impact-date { font-size: 12px; }
  #han-research .jump-nav { gap: 6px 18px; font-size: 13px; }
  #han-research .jump-nav a,
  #han-research .model-links a,
  #han-research .contact-links a,
  #han-research .resource-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  #han-research .architecture figcaption { font-size: 13px; }
  #han-research .mobile-research-cycle { display: none; }
  #han-research .section-description,
  #han-research .model-row p,
  #han-research .flagship p,
  #han-research .program-small p,
  #han-research .foundations p,
  #han-research .invitation p { font-size: 15px; line-height: 1.75; }
  #han-research .question { font-size: 16px; }
  #han-research .frontier-title { font-size: 22px; }
  #han-research .model-domain,
  #han-research .model-domain span,
  #han-research .role,
  #han-research .flagship .role,
  #han-research .program-small .role { font-size: 11px; }
  #han-research .model-title { font-size: 21px; }
  #han-research .model-links,
  #han-research .resource-link,
  #han-research .contact-links,
  #han-research .foundations .honors { font-size: 13px; }
  #han-research .program-small .program-subtitle { font-size: 14px; }
  #han-research .funding span { font-size: 12px; }

  #han-teaching { margin: 0; padding: 0; font-size: 16px; line-height: 1.75; }
  #han-teaching .hero,
  #han-teaching .approach,
  #han-teaching .course,
  #han-teaching .practice,
  #han-teaching .closing { padding-left: 28px; padding-right: 28px; }
  #han-teaching .eyebrow { font-size: 11px; letter-spacing: 1.2px; }
  #han-teaching .hero-top { flex-wrap: wrap; }
  #han-teaching .hero-top .mono { font-size: 10px; white-space: normal; }
  #han-teaching .hero-title { font-size: clamp(40px, 5.6vw, 53px); }
  #han-teaching .hero-statement { font-size: 30px; white-space: normal; }
  #han-teaching .hero-copy > p { font-size: 16px; max-width: none; }
  #han-teaching .hero-credit strong { font-size: 13px; }
  #han-teaching .hero-art { min-width: 0; margin: 0; }
  #han-teaching .button,
  #han-teaching .text-link { min-height: 44px; font-size: 14px; line-height: 1.5; }
  #han-teaching .course-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #han-teaching .course-nav a { min-width: 0; min-height: 72px; padding: 14px; align-items: flex-start; }
  #han-teaching .course-nav strong { font-size: 14px; }
  #han-teaching .course-nav small,
  #han-teaching .nav-index { font-size: 11px; }
  #han-teaching .approach { gap: 26px; }
  #han-teaching .approach > p,
  #han-teaching .course-description { font-size: 16px; line-height: 1.8; }
  #han-teaching .course-top { flex-wrap: wrap; gap: 9px; }
  #han-teaching .course-level { font-size: 12px; white-space: normal; }
  #han-teaching .course-code { font-size: 12px; }
  #han-teaching .course h2 { font-size: 32px; line-height: 1.18; }
  #han-teaching .course-question { font-size: 21px; }
  #han-teaching .topic-list li { font-size: 12px; line-height: 1.5; padding: 6px 9px; }
  #han-teaching .math-board .formula { font-size: 21px; white-space: normal; padding: 18px 0 12px; }
  #han-teaching .formula-caption { min-height: 0; font-size: 13px; }
  #han-teaching .concept-tabs { gap: 5px; padding: 14px 10px 0; }
  #han-teaching .concept-tabs button { flex: 1; min-width: 0; min-height: 44px; font-size: 12px; padding: 8px 3px; }
  #han-teaching .course-details summary { min-height: 48px; font-size: 14px; }
  #han-teaching .details-grid h3 { font-size: 15px; }
  #han-teaching .details-grid p { font-size: 14px; }
  #han-teaching .learning-line { font-size: 14px; flex-wrap: wrap; gap: 6px; }
  #han-teaching .learning-line span { font-size: 11px; flex-basis: 100%; }
  #han-teaching .model-families { gap: 10px; padding: 15px 12px; }
  #han-teaching .model-families strong { font-size: 14px; }
  #han-teaching .model-families span { font-size: 11px; }
  #han-teaching .board-top { font-size: 10px; line-height: 1.7; }
  #han-teaching .pipeline-step { padding: 12px 10px; }
  #han-teaching .pipeline-step strong { font-size: 14px; }
  #han-teaching .pipeline-step small { font-size: 12px; }
  #han-teaching .pipeline-step > span { font-size: 11px; }
  #han-teaching .board-caption { font-size: 13px; }
  #han-teaching .practice-grid { gap: 22px; }
  #han-teaching .practice-grid .mono { font-size: 12px; }
  #han-teaching .practice-grid h3 { font-size: 17px; }
  #han-teaching .practice-grid p { font-size: 14px; }
  #han-teaching .closing p { max-width: none; font-size: 14px; }
  #han-teaching .closing .text-link { font-size: 14px; white-space: normal; }

  #han-publications, #han-software { font-size: 16px; }
  #han-publications .hero-top, #han-software .hero-top { flex-wrap: wrap; gap: 8px; }
  #han-publications .eyebrow, #han-software .eyebrow { font-size: 11px; }
  #han-publications .edition, #han-software .edition { font-size: 11px; white-space: normal; }
  #han-publications .lead,
  #han-software .hero .lead { font-size: 16px; line-height: 1.8; }
  #han-publications .button, #han-publications .quiet-link,
  #han-software .button, #han-software .text-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    max-width: 100%;
    font-size: 14px;
    line-height: 1.5;
  }
  #han-publications .count-caption,
  #han-software .adoption-date,
  #han-software .adoption-caption { font-size: 12px; }
  #han-publications .section-head .section-caption { font-size: 12px; }
  #han-publications .feature-top .eyebrow { font-size: 10px; }
  #han-publications .feature .feature-summary { font-size: 15px !important; line-height: 1.75; }
  #han-publications .feature-venue { font-size: 12px; }
  #han-publications .feature-links { gap: 16px; flex-wrap: wrap; font-size: 13px; }
  #han-publications .feature-links .extra-link { font-size: 12px; }
  #han-publications .feature-links a { display: inline-flex; align-items: center; min-height: 44px; }
  #han-publications .library .intro { font-size: 15px; }
  #han-publications .scope-row { flex-wrap: wrap; }
  #han-publications .scope-switch { flex-wrap: wrap; gap: 5px; }
  #han-publications .scope-btn { min-height: 44px; font-size: 13px; }
  #han-publications .scope-btn span { font-size: 12px; }
  #han-publications .export,
  #han-publications .reset { min-height: 44px; font-size: 13px; }
  #han-publications #paper-search,
  #han-publications select { height: 46px; font-size: 16px; }
  #han-publications .search-field svg { top: 16px; }
  #han-publications .filter-foot { flex-wrap: wrap; font-size: 13px; }
  #han-publications .year-rail { min-height: 56px; padding: 6px 0; gap: 10px; }
  #han-publications .year-rail-links { flex-wrap: wrap; gap: 6px 16px; }
  #han-publications .year-rail a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
  #han-publications .year-rail .rail-count { font-size: 11px; }
  #han-publications .year-rail .back-search { font-size: 12px; }
  #han-publications .year-heading .year-total { font-size: 12px; }
  #han-publications .paper .paper-venue,
  #han-publications .paper .paper-venue.nature { font-size: 13px; }
  #han-publications .paper .paper-format { font-size: 11px; }
  #han-publications .paper h4 { font-size: 17px; line-height: 1.5; }
  #han-publications .paper-authors { font-size: 14px; }
  #han-publications .paper-bottom { font-size: 12px; }
  #han-publications .paper-actions { gap: 18px; flex-wrap: wrap; }
  #han-publications .paper-link,
  #han-publications .cite-btn { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
  #han-publications .record-note { font-size: 13px; }
  #han-publications .record-note summary { min-height: 44px; font-size: 13px; }
  #han-publications .closing p { font-size: 15px; }
  #han-publications .closing .button { white-space: normal; }
  #han-publications .empty p { font-size: 15px; }

  #han-software .portfolio-nav a { min-width: 0; padding: 18px; }
  #han-software .nav-label { font-size: 11px; }
  #han-software .nav-title { font-size: 17px; padding-right: 12px; }
  #han-software .nav-caption { font-size: 12px; }
  #han-software .project-top { align-items: flex-start; flex-wrap: wrap; }
  #han-software .project-top .eyebrow { font-size: 11px; }
  #han-software .status { font-size: 12px; white-space: normal; }
  #han-software .description { font-size: 16px; line-height: 1.8; }
  #han-software .caps span { font-size: 12px; padding: 5px 9px; }
  #han-software .credits,
  #han-software .publication,
  #han-software .evidence-note { font-size: 12px; }
  #han-software .model-item h3 { font-size: 19px; }
  #han-software .model-item p { font-size: 14px; }
  #han-software .model-item .model-meta { font-size: 11px; }
  #han-software .resource-links { font-size: 13px; gap: 8px 18px; }
  #han-software .resource-links a { display: inline-flex; align-items: center; min-height: 44px; }
  #han-software .magic-features h3 { font-size: 16px; }
  #han-software .magic-features p { font-size: 14px; }
  #han-software .release-note strong { font-size: 12px; white-space: normal; }
  #han-software .release-note p { font-size: 14px; }
  #han-software .closing p { font-size: 15px; }
  #han-software .closing .source-note { font-size: 12px; }
  #han-software .system-art { width: 100%; max-width: none; }
  #han-software .system-art figcaption { font-size: 11px; }
  #han-software .throughput p { font-size: 13px; }
  #han-software .throughput p b { font-size: 14px; }

  body.mobile-page-papers-old #centercol { overflow-wrap: anywhere; }
  body.mobile-page-papers-old .blog-content { font-size: 16px; line-height: 1.75; color: #555; }
  body.mobile-page-papers-old .blog-content font { font-size: inherit; }
  body.mobile-page-papers-old .index-news { padding: 22px 0; margin: 0; }
  body.mobile-page-papers-old .index-news h3,
  body.mobile-page-papers-old .index-news h3 a { font-size: 20px; line-height: 1.4; }
  body.mobile-page-papers-old .index-news-date { font-size: 14px; line-height: 1.6; }
  body.mobile-page-papers-old .post-date { font-size: 12px; line-height: 1.65; }
  body.mobile-page-papers-old .post-title h2,
  body.mobile-page-papers-old .post-title h2 a { font-size: 25px; line-height: 1.25; }
}

@media screen and (max-width: 640px) {
  #han-research .hero-title { font-size: clamp(31px, 7.8vw, 39px); line-height: 1.12; }
  #han-research .frontier { gap: 10px; }
  #han-research .frontier-number { width: 23px; flex-basis: 23px; }
  #han-research .model-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  #han-research .model-domain span { display: inline; margin-left: 9px; }
  #han-research .program-pair { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  #han-research .flagship { padding: 21px 18px; }
  #han-research .flagship-head { gap: 12px; flex-wrap: wrap; }
  #han-research .funding { flex-basis: auto; text-align: left; }
  #han-research .architecture { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  #han-research .architecture svg { width: 560px; max-width: none; }
  #han-research .architecture figcaption { min-width: 0; }
  #han-research .architecture.mobile-cycle-ready { overflow: visible; }
  #han-research .architecture.mobile-cycle-ready > svg { display: none; }
  #han-research .mobile-research-cycle { display: block; }
  #han-research .mobile-cycle-heading { margin: 0 0 16px; font-size: 11px; line-height: 1.6; font-weight: 700; letter-spacing: 1.1px; color: #7c5968; }
  #han-research .mobile-cycle-steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; padding: 0; list-style: none; }
  #han-research .mobile-cycle-step { position: relative; padding: 18px 16px; border: 1px solid #d8c9ce; border-left: 3px solid #805768; background: #fbf8f8; }
  #han-research .mobile-cycle-step + .mobile-cycle-step::before { content: "↓"; position: absolute; top: -25px; left: 50%; transform: translateX(-50%); color: #805768; font-size: 20px; line-height: 23px; }
  #han-research .mobile-cycle-step:nth-child(2) { border-color: #cbd5dc; border-left-color: #577481; background: #f0f5f6; }
  #han-research .mobile-cycle-step:nth-child(3) { border-color: #d0d9cf; border-left-color: #667f69; background: #f3f6ef; }
  #han-research .mobile-cycle-label { display: block; margin-bottom: 7px; font-size: 11px; font-weight: 700; letter-spacing: 1.1px; line-height: 1.5; color: #805768; }
  #han-research .mobile-cycle-step:nth-child(2) .mobile-cycle-label { color: #577481; }
  #han-research .mobile-cycle-step:nth-child(3) .mobile-cycle-label { color: #667f69; }
  #han-research .mobile-cycle-title { display: block; margin-bottom: 9px; font-size: 19px; font-weight: 700; line-height: 1.3; color: #26373f; }
  #han-research .mobile-cycle-detail { display: block; font-size: 14px; line-height: 1.8; color: #5b6c72; }
  #han-research .mobile-cycle-feedback { margin: 16px 0 0; padding: 14px 2px 2px; border-top: 1px solid #ded5d7; color: #795568; font-size: 12px; line-height: 1.8; font-weight: 700; text-align: center; }

  #han-teaching .hero,
  #han-teaching .approach,
  #han-teaching .course,
  #han-teaching .practice,
  #han-teaching .closing { padding-left: 22px; padding-right: 22px; }
  #han-teaching .hero-body { grid-template-columns: minmax(0, 1fr); padding-top: 28px; }
  #han-teaching .hero-title { font-size: clamp(40px, 11vw, 57px); }
  #han-teaching .hero-statement { font-size: clamp(25px, 6.8vw, 34px); letter-spacing: -1px; }
  #han-teaching .hero-art { max-width: 400px; margin: 20px auto 0; width: 100%; }
  #han-teaching .hero-credit { padding-top: 18px; padding-bottom: 20px; }
  #han-teaching .course-nav { grid-template-columns: minmax(0, 1fr); }
  #han-teaching .course-nav a { border-right: 0; border-bottom: 1px solid #e2dcdf; min-height: 68px; padding: 14px 22px; gap: 14px; align-items: center; }
  #han-teaching .course-nav a:last-child { border-bottom: 0; }
  #han-teaching .course-nav strong { font-size: 15px; }
  #han-teaching .course-nav small { font-size: 12px; }
  #han-teaching .approach,
  #han-teaching .course-grid,
  #han-teaching .details-grid,
  #han-teaching .practice-grid { grid-template-columns: minmax(0, 1fr); }
  #han-teaching .approach { gap: 16px; }
  #han-teaching .course-grid { gap: 28px; }
  #han-teaching .course h2 { font-size: clamp(28px, 7.2vw, 34px); }
  #han-teaching .math-board,
  #han-teaching .architecture,
  #han-teaching .project-board { width: 100%; max-width: 480px; margin-left: auto; margin-right: auto; }
  #han-teaching .math-board .formula { font-size: clamp(18px, 4.6vw, 23px); }
  #han-teaching .concept-tabs button { font-size: 11px; }
  #han-teaching .practice-grid { gap: 24px; }
  #han-teaching .practice-grid .mono { margin-bottom: 6px; }

  #han-publications .hero,
  #han-publications .featured,
  #han-publications .closing,
  #han-software .hero,
  #han-software .project,
  #han-software .closing { padding: 28px 22px; }
  #han-publications .hero::before,
  #han-software .hero::before { left: 22px; }
  #han-publications .library { padding: 28px 22px 0; }
  #han-publications .hero-grid { gap: 22px; }
  #han-publications h1,
  #han-software .hero h1 { font-size: clamp(31px, 8vw, 39px); }
  #han-publications .venue-strip { padding: 0 22px; grid-template-columns: minmax(0, 1fr); }
  #han-publications .venue-stat,
  #han-publications .venue-stat:first-child { padding: 16px 0; border-right: 0; border-bottom: 1px solid #d9ddd7; gap: 18px; }
  #han-publications .venue-stat:last-child { border-bottom: 0; }
  #han-publications .venue-stat strong { min-width: 44px; font-size: 30px; }
  #han-publications .venue-stat b { font-size: 16px; }
  #han-publications .venue-stat small { font-size: 11px; }
  #han-publications .venue-stat .stat-arrow { display: block; }
  #han-publications .feature-grid { grid-template-columns: minmax(0, 1fr); }
  #han-publications .section-head { display: block; }
  #han-publications .section-head .section-caption { text-align: left; max-width: none; margin-top: 8px; }
  #han-publications .controls { padding: 14px; }
  #han-publications .search-row { grid-template-columns: minmax(0, 1fr); }
  #han-publications .search-field { grid-column: auto; }
  #han-publications .year-rail { position: static; flex-wrap: wrap; padding: 8px 0; }
  #han-publications .year-rail-links { gap: 4px 14px; }
  #han-publications .paper { grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 24px 0; }
  #han-publications .paper .paper-venue { display: inline; }
  #han-publications .paper .paper-format { display: inline; margin-left: 8px; }
  #han-publications .paper h4 { font-size: 18px; }
  #han-publications .paper-bottom { display: block; }
  #han-publications .paper-actions { margin-top: 8px; }

  #han-software .portfolio-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #han-software .nav-title { font-size: 16px; }
  #han-software .nav-caption { font-size: 12px; }
  #han-software .project-title.family-title { font-size: clamp(25px, 6.3vw, 31px); line-height: 1.3; }
  #han-software .project-title { font-size: 32px; }
  #han-software .project-grid,
  #han-software .project-grid.reverse,
  #han-software .model-resources,
  #han-software .magic-features { grid-template-columns: minmax(0, 1fr); }
  #han-software .model-resources { gap: 0; }
  #han-software .model-item,
  #han-software .model-item:first-child,
  #han-software .model-item:last-child { padding: 19px 0; border-right: 0; border-bottom: 1px solid var(--hair); }
  #han-software .model-item:first-child { padding-top: 0; }
  #han-software .model-item:last-child { border-bottom: 0; padding-bottom: 0; }
  #han-software .model-item p { min-height: 0; margin-bottom: 8px; }
  #han-software .magic-features { gap: 20px; }
  #han-software .release-note { flex-direction: column; gap: 5px; }
  #han-software .throughput { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
}

@media screen and (max-width: 359px) {
  #han-teaching .hero,
  #han-teaching .approach,
  #han-teaching .course,
  #han-teaching .practice,
  #han-teaching .closing,
  #han-publications .hero,
  #han-publications .featured,
  #han-publications .closing,
  #han-software .hero,
  #han-software .project,
  #han-software .closing { padding-left: 17px; padding-right: 17px; }
  #han-publications .library { padding-left: 17px; padding-right: 17px; }
  #han-publications .hero::before,
  #han-software .hero::before { left: 17px; }
  #han-publications .scope-btn { padding: 8px; font-size: 12px; }
  #han-publications .scope-btn span { padding-left: 4px; }
  #han-publications .hero-count { gap: 14px; }
  #han-publications .hero-count .count { font-size: 54px; }
  #han-software .portfolio-nav a { padding: 16px 12px; }
  #han-software .nav-arrow { right: 9px; }
  #han-software .adoption { gap: 13px; }
  #han-software .adoption-value { font-size: 49px; }
  #han-software .adoption-label { font-size: 12px; }
  #han-teaching .concept-tabs { padding-left: 7px; padding-right: 7px; gap: 3px; }
  #han-teaching .concept-tabs button { font-size: 10px; }
  #han-teaching .model-families { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  #han-teaching .model-families div { border-right: 0; }
}
