/* Responsive additions. Existing desktop styles remain unchanged. */
.mobile-navigation,.mobile-label,.mobile-browse,.table-hint,.toc-disclosure>summary{display:none}

@media (max-width: 920px) {
  body[data-layout="home"] .hero__grid{gap:28px}
  body[data-layout="home"] .hero__media figure{margin:0}
  body[data-layout="home"] .media__thumbs{gap:12px}
  body[data-layout="home"] .media__thumb img{height:160px}
  body[data-layout="home"] .section{padding-top:56px;padding-bottom:56px}
  body[data-layout="home"] .about{gap:24px}
  body[data-layout="home"] .about__photo{max-width:460px}
  body[data-layout="home"] .about__photo img{height:auto;aspect-ratio:4/3;object-fit:cover;object-position:center 24%}
  body[data-layout="home"] .home-article-card{min-width:0}
  .article .service-callout{margin-inline:0}
}

@media (max-width: 780px) {
  html{scroll-padding-top:88px;-webkit-text-size-adjust:100%;text-size-adjust:100%}
  body{overflow-wrap:break-word}
  body[data-layout="article"],body[data-layout="library"],body[data-layout="error"]{font-size:17px;line-height:1.7}
  .mobile-label{display:inline}
  .desktop-label{display:none}

  /* Library/article navigation: readable intro action and a full menu. */
  body:not([data-layout="home"]) .nav{padding:10px 16px;gap:10px;min-height:68px;position:relative}
  body:not([data-layout="home"]) .nav .brand{font-size:19px;margin-right:auto;line-height:1.2;display:flex;align-items:center;min-height:44px}
  body:not([data-layout="home"]) .nav .nav-links{flex:none;gap:0}
  body:not([data-layout="home"]) .nav .nav-links>a:not(.button){display:none!important}
  body:not([data-layout="home"]) .nav .nav-links .button{font-size:13px;min-height:44px;padding:11px 12px;white-space:nowrap}
  .mobile-navigation{display:block;flex:none}
  .mobile-navigation>summary{display:flex;align-items:center;justify-content:center;cursor:pointer;width:44px;height:44px;border:1px solid #344457;border-radius:10px;list-style:none;color:#e8eef7;background:#111b27}
  .mobile-navigation>summary::-webkit-details-marker{display:none}
  .mobile-navigation>summary:focus-visible,.toc-disclosure>summary:focus-visible{outline:3px solid #b5d6ff;outline-offset:3px}
  .mobile-navigation[open]>summary{background:#20344c;border-color:#60a5fa}
  .mobile-navigation .mobile-menu{position:absolute;left:16px;right:16px;top:calc(100% + 4px);padding:10px;background:#0f1824;border:1px solid #344457;border-radius:14px;box-shadow:0 16px 40px #0008;max-height:calc(100dvh - 100px);overflow-y:auto}
  .mobile-menu a{display:flex;align-items:center;min-height:48px;padding:10px 14px;border-radius:8px;font-size:16px;color:#e8eef7;text-decoration:none}
  .mobile-menu a:hover,.mobile-menu a:focus-visible{background:#1b2b3f}

  /* Reading: fewer empty gaps, comfortable text, optional contents. */
  body[data-layout="article"] .hero,body[data-layout="error"] .hero{padding:20px 20px 24px}
  body[data-layout="article"] .hero .back{display:inline-flex;align-items:center;min-height:44px;font-size:14px}
  body[data-layout="article"] .hero .eyebrow{margin:16px 0 14px;font-size:11px;letter-spacing:.12em}
  body[data-layout="article"] h1{font-size:clamp(30px,7.7vw,40px);line-height:1.14;margin-bottom:18px;letter-spacing:-.035em}
  body[data-layout="article"] .deck{font-size:17px;line-height:1.65;margin-bottom:20px}
  body[data-layout="article"] .byline{margin-top:18px;font-size:12px;gap:10px;line-height:1.6}
  .article{padding:0 20px 32px;font-size:17px;line-height:1.75}
  .article p{margin-bottom:20px}
  .article .quick-answer{padding:20px;margin-bottom:20px;border-radius:0 10px 10px 0}
  .article .quick-answer p:last-child{font-size:16px;line-height:1.75}
  .article h2{font-size:26px;line-height:1.23;margin:34px 0 18px;scroll-margin-top:0}
  .article h3{font-size:20px;line-height:1.35;margin:25px 0 12px}
  .article-toc{padding:0;border-radius:10px;margin-bottom:30px;overflow:hidden}
  .article-toc .toc-label{display:none}
  .toc-disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:54px;padding:14px 18px;cursor:pointer;list-style:none;font-size:15px;font-weight:650;color:#e8eef7}
  .toc-disclosure>summary::-webkit-details-marker{display:none}
  .toc-disclosure>summary::after{content:'+';font-size:22px;line-height:1;color:#60a5fa}
  .toc-disclosure[open]>summary::after{content:'−'}
  .article-toc ol{columns:1;padding:0 18px 12px}
  .article-toc li{margin:0;border-top:1px solid #26313e}
  .article-toc a{display:flex;align-items:center;min-height:44px;padding:10px 0;font-size:14px;line-height:1.5}
  .service-callout{margin:32px 0;padding:22px;grid-template-columns:1fr;gap:20px;border-radius:0 12px 12px 0;min-width:0}
  .service-callout h2{font-size:27px;margin:0 0 14px}
  .service-callout p{margin-bottom:14px}
  .service-callout .offer{font-size:14px;line-height:1.7;margin-top:18px}
  .callout-actions{gap:10px}
  .callout-actions .button{min-height:48px;font-size:14px;padding:13px 16px}
  .table-hint{display:block;font-size:12px;color:#aab8cb;margin:20px 0 6px}
  .table-scroll{overscroll-behavior-x:contain;border:1px solid #344457;border-radius:8px;margin:0 0 26px}
  .table-scroll:focus-visible{outline:3px solid #60a5fa;outline-offset:3px}
  .article .table-scroll table{display:table;margin:0;min-width:480px;font-size:14px}
  .article .table-scroll th,.article .table-scroll td{padding:12px}
  .related{padding:32px 20px 40px}
  .related h2{font-size:29px}
  .related .cards{gap:14px}
  .related .card{padding:22px}
  .card .read-link{display:inline-flex;align-items:center;min-height:44px;font-size:14px;align-self:flex-start}
  .footer{margin:0 20px;padding:22px 0 max(26px,env(safe-area-inset-bottom));gap:4px;font-size:13px}
  .footer>a{display:flex;align-items:center;min-height:44px;align-self:flex-start;overflow-wrap:anywhere}

  /* Put library search before recommendations on mobile. */
  .library-hero{padding:32px 20px 24px}
  .library-hero .eyebrow{font-size:11px;letter-spacing:.12em;margin-bottom:16px}
  .library-hero h1{font-size:clamp(34px,8.6vw,44px);line-height:1.13;margin-bottom:20px;letter-spacing:-.04em}
  .library-hero .deck{font-size:17px;line-height:1.65;margin-bottom:20px}
  .library-meta{gap:8px;margin-top:20px}
  .library-meta span{font-size:11px;line-height:1.5;padding:7px 11px}
  .mobile-browse{display:inline-flex;min-height:44px;align-items:center;gap:8px;font-size:14px;font-weight:650;margin-top:18px}
  .library-wrap{padding:0 20px 40px}
  .directory-head{order:0;padding:26px 0 6px;scroll-margin-top:88px}
  .directory-head h2{font-size:27px}
  .directory-head .eyebrow{display:none}
  .search-tools{grid-template-columns:minmax(0,1fr) auto;gap:14px 10px}
  .search-tools>div:first-child{grid-column:1/-1}
  .search-tools>div{min-width:0}
  .search-tools label{font-size:13px}
  .search-tools input,.search-tools select{font-size:16px;min-height:48px;min-width:0;padding:12px}
  .search-tools .button{font-size:13px;padding:12px;min-height:48px}
  #result-count{margin:14px 0 22px;font-size:13px}
  .start-here{order:1;padding:28px 0 32px}
  .start-here h2{font-size:27px}
  .start-here .cards{margin-top:20px;gap:14px}
  .library-wrap[data-filtered="true"] .start-here{display:none}
  .topic-section{order:2;padding-top:24px;margin-bottom:12px}
  .topic-section>h2{font-size:25px;line-height:1.25}
  .topic-section>.topic-deck{font-size:15px;margin-bottom:18px}
  .library-wrap .service-callout{order:3}
  .library-wrap .cards{grid-template-columns:1fr;gap:12px}
  .library-wrap .card,.library-wrap .topic-section .card{padding:20px}
  .library-wrap .card h3,.library-wrap .topic-section .card h3{font-size:21px;line-height:1.3;margin-bottom:12px}
  .library-wrap .card p{font-size:15px;line-height:1.65;margin-bottom:12px}
  .library-wrap .card .eyebrow{font-size:10px;letter-spacing:.1em;margin-bottom:12px}
  .library-wrap .card .read-link{margin-bottom:-6px}
}

@media (max-width: 760px) {
  body[data-layout="home"]{font-size:16px;line-height:1.6}
  body[data-layout="home"] .skip-link:not(:focus){top:-100px}
  body[data-layout="home"] .container{width:calc(100% - 32px)}
  body[data-layout="home"] .nav{min-height:66px;padding:10px 0}
  body[data-layout="home"] .brand__link{min-height:44px}
  body[data-layout="home"] .nav__toggle{width:44px;height:44px;align-items:center;justify-content:center;cursor:pointer}
  body[data-layout="home"] .nav__menu{top:calc(100% + 4px);right:16px;width:min(340px,calc(100% - 32px));padding:10px;max-height:calc(100dvh - 96px);overflow-y:auto}
  body[data-layout="home"] .nav__link{display:flex;align-items:center;min-height:46px;padding:10px 14px;font-size:16px}
  body[data-layout="home"] .btn{min-height:48px;font-size:15px;line-height:1.4;padding:13px 18px;text-align:center}
  body[data-layout="home"] .hero{padding-top:30px;padding-bottom:24px}
  body[data-layout="home"] h1{font-size:clamp(31px,8.1vw,39px);line-height:1.1;letter-spacing:-.03em;margin-bottom:18px}
  body[data-layout="home"] h2{font-size:29px;line-height:1.18}
  body[data-layout="home"] .kicker{font-size:12px;line-height:1.6;padding:8px 12px;margin-bottom:18px}
  body[data-layout="home"] .lead{font-size:17px;line-height:1.65}
  body[data-layout="home"] .checklist{gap:9px;margin-top:16px}
  body[data-layout="home"] .checklist li{font-size:15px;line-height:1.6}
  body[data-layout="home"] .hero__cta,body[data-layout="home"] .about__cta,body[data-layout="home"] .cta__buttons{display:grid;grid-template-columns:1fr;gap:10px}
  body[data-layout="home"] .hero__cta{margin-top:22px}
  body[data-layout="home"] .chips{gap:8px}
  body[data-layout="home"] .chip{font-size:12px;line-height:1.6;border-radius:12px;padding:7px 10px}
  body[data-layout="home"] .micro{font-size:13px;line-height:1.7}
  body[data-layout="home"] .hero__media .media__main img{height:auto;aspect-ratio:4/3;object-fit:cover}
  body[data-layout="home"] .media__thumbs{gap:10px}
  body[data-layout="home"] .media__thumb img{height:110px;object-position:center 24%}
  body[data-layout="home"] .section{padding:44px 0}
  body[data-layout="home"] .section__head{gap:10px;margin-bottom:22px}
  body[data-layout="home"] .section__head p{font-size:15px;line-height:1.65}
  body[data-layout="home"] .cards,body[data-layout="home"] .steps,body[data-layout="home"] .pricing{gap:12px}
  body[data-layout="home"] .card,body[data-layout="home"] .step{padding:20px}
  body[data-layout="home"] .price-card{padding:22px;gap:8px}
  body[data-layout="home"] .price-card h3{padding-right:0;font-size:22px}
  body[data-layout="home"] .badge{position:static;align-self:flex-start;margin-bottom:4px}
  body[data-layout="home"] .price{font-size:34px}
  body[data-layout="home"] .price-card .btn{width:100%}
  body[data-layout="home"] .note{padding:20px;gap:16px}
  body[data-layout="home"] .note .btn{width:100%}
  body[data-layout="home"] .about__copy{order:-1}
  body[data-layout="home"] .about__photo{width:100%;max-width:420px;margin-inline:auto}
  body[data-layout="home"] .highlight{padding:14px}
  body[data-layout="home"] .highlight__value{font-size:14px;line-height:1.65}
  body[data-layout="home"] .home-article-grid{grid-template-columns:1fr;gap:12px}
  body[data-layout="home"] .home-article-card{padding:20px;gap:8px}
  body[data-layout="home"] .home-article-card h3{font-size:21px;line-height:1.3}
  body[data-layout="home"] .home-article-card p:not(.library-kicker){font-size:15px;line-height:1.65}
  body[data-layout="home"] .home-read{display:flex;align-items:center;min-height:44px;align-self:flex-start}
  body[data-layout="home"] .home-library-action{display:grid;gap:14px;margin-top:22px}
  body[data-layout="home"] .faq__item{padding:0 18px}
  body[data-layout="home"] .faq__item summary{padding:15px 0;min-height:52px;font-size:16px;line-height:1.5}
  body[data-layout="home"] .faq__item p{padding-bottom:18px;margin-top:0;font-size:15px;line-height:1.7}
  body[data-layout="home"] .cta{padding:22px}
  body[data-layout="home"] .contact{gap:12px}
  body[data-layout="home"] .contact__value{font-size:14px;overflow-wrap:anywhere}
  body[data-layout="home"] .contact a{display:flex;align-items:center;min-height:44px}
  body[data-layout="home"] .fineprint{font-size:12px;line-height:1.7}
  body[data-layout="home"] .footer{margin:0 auto;gap:12px;align-items:flex-start;padding:0}
  body[data-layout="home"] .footer>a{min-height:44px;display:flex;align-items:center}
  body[data-layout="home"] .footer__small{font-size:12px;line-height:1.7}
  body[data-layout="home"] .site-footer{padding-bottom:max(28px,env(safe-area-inset-bottom))}
}

@media (max-width: 360px) {
  body:not([data-layout="home"]) .nav{padding-inline:14px;gap:7px}
  body:not([data-layout="home"]) .nav .brand{font-size:17px}
  body:not([data-layout="home"]) .nav .nav-links .button{font-size:12px;padding-inline:10px}
  body[data-layout="article"] .hero,.article,.library-hero,.library-wrap{padding-left:16px;padding-right:16px}
  .article .quick-answer{padding:18px}
  .service-callout{padding:18px}
}

/* Keep callouts inside tablet edges, including larger touch-screen tablets. */
@media (max-width: 920px) {
  .library-wrap>.service-callout{margin-inline:0}
}
@media (max-width: 1180px) and (pointer: coarse) {
  .library-wrap>.service-callout{margin-inline:0}
  .search-tools input,.search-tools select{font-size:16px}
  .site-header a{min-height:44px}
}
